CANWeatherBoard2.0

From VentureResearchWiki
Jump to navigation Jump to search

Programming CAN Weather Board v2.0 / v2.1[edit | edit source]

Preparation[edit | edit source]

  1. Required items: Linux Board with CAN bus connection, ST-LINK programmer

Bootloader Programming[edit | edit source]

  1. The CAN Weather Board uses the same bootloader as the Mini IO board.
  1. Open STM32CubeProgrammer program.
  2. Select 'Programming' section on the left menu.
  3. Ensure settings are correct, and click the 'Start automatic mode' button.
    1. File Path for correct Boot Loader
    2. Start address 0x08000000
    3. Verify Programming checked
    4. Full Chip Erase checked
    5. Download File checked
    6. Option Bytes commands set to "-ob rdp=0xbb" for Code Readout Protection
    7. Stm32cubeprogrammer-settings-mini-io.png
  4. Plug in the STM32 programming cable into the board.
  5. Power on the board.
  6. Watch the programming output to see if the board is programmed.

Weather Board Firmware Programming[edit | edit source]

  1. reset the board by unplugging and replugging in the Power / CAN cable.
  2. watch the bootloader lights pattern to show fast blinking.
  3. run the script ./can_wx_program.sh on the board, which runs vr-canboot with the current version of the Weather Board firmware.
    1. This script looks like this:
#!/bin/bash
echo "please press any key when board is plugged into CAN bus and bootloader is blinking"
read WAIT
vr-canboot --start 0x10000 -f CAN_WX_Board_2.0_v2.0.5.bin -v -a 170
# download the firmware file: wget http://readonly:secret@svn/svn/source/projects/STM32/CAN_WX_Board_2.0/Release/CAN_WX_Board_2.0_v2.0.5.bin


VRSerial Setup[edit | edit source]

  1. After programming, the board should reboot into the application. The application will connect over CAN and you should see it at address VRSN00000170.
  2. Set a VRSerial:
VRSN170 SET VRSERIAL 12345
  1. Set a ComponentID:
VRSN170 SET COMPONENTID 123
  1. Commit:
VRSN170 COMMIT
  1. Almost done ... Apply a board serial number to the board, and see next section.

Temperature testing[edit | edit source]

  1. A separate temperature testing step is needed for this board, to verify that the external temperature probe is working correctly and accurately.
  2. Please refer to the following image. The LM4040 board red+black power connection is plugged into the 'I2C' port, and the yellow probe wire connects to the input port of the temperature probe, the 'H01' side of the temp probe.
    1. WX Board Temp.jpg
  3. This should output a temperature of -11.4 ~ -11.5 C when using "GET TEMP2" on the CAN WX board.