Status LEDs

Programmable Sensor Module with CAN Connection
Post Reply
Kasutajanimi123
Posts: 1
Joined: Thu 24. Aug 2023, 11:34

Status LEDs

Post by Kasutajanimi123 » Thu 24. Aug 2023, 11:36

Can someone brief me on meaning of Status LEDs on PCAN-GPS (by default)? Manual has hardly any information on that.

Thank you in advance.

M.Maidhof
Support
Support
Posts: 1751
Joined: Wed 22. Sep 2010, 14:00

Re: Status LEDs

Post by M.Maidhof » Thu 24. Aug 2023, 12:43

Hi,

please have a look into the source code of the firmware to see how the LEDs are used in the default firmware (PEAK-DevPack\Hardware\PCAN-GPS\Examples\00_Delivery_Firmware\main.c):

Code: Select all

//------------------------------------------------------------------------------
//! void Timer_1000usec(void)
//------------------------------------------------------------------------------
//! @brief	this function is called every 1[ms] by timer0 match-interrupt ISR
//------------------------------------------------------------------------------
void Timer_1000usec(void){
	static u32_t  LedBlink_counter=0;
	static u8_t	toggle_led = 0;

	if (!Initialized)
		return;

	if (LedBlink_counter < 1000){
		LedBlink_counter++;
	}else{
		LedBlink_counter = 0;

		toggle_led ^= 1;		// invert flag and set new value
		if (toggle_led){
			HW_SetLED (HW_LED_STATUS_1, HW_LED_GREEN);
		} else {
			HW_SetLED(HW_LED_STATUS_1, HW_LED_OFF);
		}
	}
}
 
In bootloader mode the LEDs are flashing as written in the manual (status1: fast orange blinking, status 2 static orange)

regards

Michael

Post Reply