Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

There are two mini-main functions for testing the power distribution firmware on the boards. They’re on the branches soft_144_test_pd_current_measurement for testing the current measurement firmware and soft_144_test_pd_can_rx_and_gpio for testing CAN messages to GPIO firmware. Both should detect front/rear power distribution based on pins 30 and 31 being shorted on rear, but if they are unshorted it’ll default to front; uncomment the define at the top of power_distribution.c to force it to use rear power distribution.

soft_144_test_pd_current_measurement should, every 500 ms, output on minicom a list of the current measurements by pin; I’m not sure how exactly the numbers correspond to current but they should increase if you put current on the power pins

soft_144_test_pd_can_rx_and_gpio should upon receipt of a CAN message turn on certain GPIO pins. Some that should be good for testing are:
For front power distribution:

  • message id SYSTEM_CAN_MESSAGE_FRONT_POWER (21) with the first data u16 EE_FRONT_POWER_DISTRIBUTION_OUTPUT_STEERING (1) and should turn on steering if the second data u16 is nonzero and turn off steering if the second data u16 is 0, and should do the same for driver display if the first data u16 is EE_FRONT_POWER_DISTRIBUTION_OUTPUT_DRIVER_DISPLAY (0) and for pedal if it’s EE_FRONT_POWER_DISTRIBUTION_OUTPUT_PEDAL (3), e.g.

  • message id SYSTEM_CAN_MESSAGE_POWER_ON_MAIN_SEQUENCE (6) with the first data u16 EE_POWER_MAIN_SEQUENCE_TURN_ON_EVERYTHING (5) should turn on driver display, steering, centre console, pedal, horn, speaker, left and right display, rear display, main and rear rPi, and left and right camera

  • subsequently sending message id SYSTEM_CAN_MESSAGE_POWER_OFF_SEQUENCE (7) with the first data u16 EE_POWER_OFF_SEQUENCE_TURN_OFF_EVERYTHING (1) should turn off driver display, steering, speaker, left and right display, rear display, main and rear rPi, left and right camera, and parking brake (should this be turned off?), but should leave on centre console, pedal, and horn

For rear power distribution:

  • message id SYSTEM_CAN_MESSAGE_LIGHTS (24) with the first data u16 EE_LIGHT_TYPE_BRAKES (1) should turn on the left, centre, and right brake lights if the second data u16 is nonzero and turn them off if the second data u16 is 0

  • message id SYSTEM_CAN_MESSAGE_POWER_ON_MAIN_SEQUENCE (6) with the first data u16 EE_POWER_MAIN_SEQUENCE_TURN_ON_EVERYTHING (5) should turn on BMS carrier, MCI, solar sense, telemetry, charger, and rear camera

  • subsequently sending message id SYSTEM_CAN_MESSAGE_POWER_OFF_SEQUENCE (7) with the first data u16 EE_POWER_OFF_SEQUENCE_TURN_OFF_EVERYTHING (1) should turn off everything except BMS carrier, MCI, and solar sense (including lights)

(the full definitions are in power_distribution_gpio_config.c and power_distribution_can_rx_event_mapper_config.c )

  • No labels