Testing
Contents
Check the ARM7 CPU
After putting everything together you first need to test your new NG. If that succeeds you can start flashing firmwares for the different processors on-board.
Do a quick check of your LPC 2148 board. Connect it to a USB port on your computer. Both LEDs should glow, the red one for power indication and the yellow one for USB indication. Also, your mouse might move in a square path - this is because often the board comes pre-installed with their USB mouse demo. This will go away once you have flashed our firmware onto the LPC.
First Powerup
For a first powerup of the FC board you should have a power source with current limiter, e.g. a lab power supply. That way you can make sure that your hardware will not burn up if you have a short-circuit somewhere. Make sure to unplug as much as you can (bl-controller, rc-receiver, sensors, LPC headerboard) and just power up the bare FC with 10V to 12V at the battery input and the current limit set to 300mA. That way you can make sure that no sensitive parts get damaged.
Your board should not use much current. To be true, with everything unplugged it should use practically none (maybe 1-2mA). If it draws more than a few mA or if the limiter of the power supply triggers, then something is amiss and you should check the board for short-circuits. Measure the 5V supply voltage and make sure the ON/OFF switch circuitry works. Keep in mind: without the LPC2148 you can not measure the 3.3V.
If everything looks fine, power it down again and start to plug in all the stuff you unplugged before except for the BL controllers. Then repeat the powerup test and check the current. A fully equipped FC and SB connected should draw less than 250mA at 12V.
If all looks fine, then reattach the BL controllers. You are ready now to start flashing the different on-board processors as described in the next sections.
Checking the BLCs using the BLC HAL
To check the BLCs you need a special HAL. Otherwise you would have to attach exactly the right amount of BLCs as the currently configured HAL needs. To overcome this the BLC HAL was invented. It needs 0 BLC but can use up to 16 BLCs essentially meaning that you may attach any number of BLCs up to 16.
To test you BLCs, first attach the BLC(s) using power and I2C to your NG. When you boot your NGOS, you should see the attached number of BLCs in the Actor Bus-Scan:
I2C1: Actor bus-scan callback task... successfully finished. I2C1: Detected device activation... successfully finished. I2C1: Activated 1 devices.
If this number does not match the number of attached BLCs, then you have a I2C problem and you should first debug your I2C1 Actor Bus. If the number matches, you will also see the BLC(s) in "show devices".
To use the BLC HAL, choose a sensible controller and activate the HAL:
# set controller amir Activated controller 'amir' Setting string 'controller' to 'amir' # set HW.HAL blc Activated propeller HAL 'blc' Setting 'HW.HAL' to HAL 'blc'
Next you can check the current HAL using the following command:
# show hal Current HAL: blc HAL Id: 1 HAL Description: The BLC test HAL HAL Quality: only for testing purposes Needed number of actors: 0 Active number of actors: 16 Detected number of actors: 0 Motor 1: BLC1 Motor 2: BLC2 Motor 3: BLC3 Motor 4: BLC4 Motor 5: BLC5 Motor 6: BLC6 Motor 7: BLC7 Motor 8: BLC8 Motor 9: BLC9 Motor 10: BLC10 Motor 11: BLC11 Motor 12: BLC12 Motor 13: BLC13 Motor 14: BLC14 Motor 15: BLC15 Motor 16: BLC16 Description: This HAL can't fly. It's suited for testing single BLC-Controllers. Controller output is ignored and the HAL outputs the values below to the available actors. Current HAL configuration: HW.HAL blc HW abstraction layer BLC1 0 BL-Controller 1 output BLC2 0 BL-Controller 2 output BLC3 0 BL-Controller 3 output BLC4 0 BL-Controller 4 output BLC5 0 BL-Controller 5 output BLC6 0 BL-Controller 6 output BLC7 0 BL-Controller 7 output BLC8 0 BL-Controller 8 output BLC9 0 BL-Controller 9 output BLC10 0 BL-Controller 10 output BLC11 0 BL-Controller 11 output BLC12 0 BL-Controller 12 output BLC13 0 BL-Controller 13 output BLC14 0 BL-Controller 14 output BLC15 0 BL-Controller 15 output BLC16 0 BL-Controller 16 output
As you can see, this HAL has 16 HAL parameters called "BLC1" to "BLC16". "BLC1" represents the BLC with the first address. "BLC2" represents the BLC with the second address.
Next, we will activate the actors and then set the output to one of the BLCs to something non-zero. This will activate the actor and let the motor spinup, if everything is fine...
# on Activated controller and actors # set BLC1 30 Setting integer byte 'BLC1' to '30' # set BLC1 35 Setting integer byte 'BLC1' to '35' # off Deactivated controller and actors
Please take care: The above will activate the actor and the motor should spinup!
If anything is wrong (Debugging Checklist)
The LPC doesn't boot (after flashing!)
- HW-release: HW 0.xx
- Symptoms:
- No Knigth-Rider style light
- No Beeps
- No shells
- Check:
- power supply
Disconnect everything from the FligthControl Board: SensorBoard, BLCs (!!!), Servos, ...
- Pull the LPC module out and just connect USB: can you use the shell?
The LPC hangs after a Bus-Scan
- HW-release: HW 0.xx
- Symptoms:
- Knight-Rider style light
- LPC starts booting: "NGOS Version 0.xx, Revision xxxx, starting up..."
- LPC outputs boot messages on the UARTs and USB
- LPC stops booting after one of the "xxxx: yyyy bus-scan callback task..."
- LPC never outputs "successfully finished."
- Check:
Mini is starting up after connecting battery
- HW-release: HW 0.22 mini
- Symptoms:
- Mini will be fully powered after connecting the Battery
- Power could not be interrupted by pressing On/Off
- Known damages:
Resistance between source and drain of T1 will be in range of 0R. ==> Change T1
Resistance above R5 will be in range of 0R. ==> Change IC2
Mini flashing problems
- HW-release: HW 0.22 mini
- Symptoms:
- unable to flash
- Known issues:
- use UART0 (Connector X5) !!!
- set jumper SJ1 to 5V (2 pins close to the edge)
cross the cables from the UART to the NGUSB! (otherwise 5V -> GND, GND -> 5V)
