LPC845MAX board, strange result blinking blue led

cancel
Showing results for 
Search instead for 
Did you mean: 

LPC845MAX board, strange result blinking blue led

369 Views
luis-martinez
Contributor III

Dear friends,

For info and (welcome) comments about any idea of this strange result when programing the led's blinking.

Evaluating this MCU on LPC845MAX board I exerciced the blinking with red, green and blue led, no problem when I blink red or green led but I obtain a "SYGSTOP hard fault signal" when I tryed activating the blue one.

I using same addresing and register control, the MCU configuration is by default (no config tools, clocks, PIOs or other)... The program does:

1st. Enable SYSCON for PIO0 and PIO1 with,  *((unsigned int *)0x40048080U)|= 0x00100040U; // bits 6 and 20 to '1'.

2nd. Activate DIR0 as output (PIO0, red & green) with, *((unsigned int *)0xa0002000U)|= 0x00001001U; //  bits 12 and 0 to '1'.

3rd. Activate DIR1 as output (PIO1, blue) with, *((unsigned int *)0xa0002004U)|= 0x00008000U; // bit 15 to '1'.

4th. Write led RO to on / off whit, *((unsigned int *)0xa000000cU)&= 0x0U; *((unsigned int *)0xa000000cU)|= 0x1U;

5th. Write led GRE to on / off whit, *((unsigned int *)0xa0000000U)&= 0x0U; *((unsigned int *)0xa0000000U)|= 0x1U;

6th. Write led BLU to on / off whit, *((unsigned int *)0xa000002FU)&= 0x0U;  *((unsigned int *)0xa000002FU)|= 0x1U;

Well, when program executes the 6th action I received the SEGSTOP fault in the probe, excluding this 6th action all work perfectly, also if I writte directly the 0xa000002F location to '0' or to '1' blue led blinks perfect,...

I suspect some more register should be configured in the MCU register but sincerelly I don't have idea what bit or register should be touch.

Many thanks your comments and help

Best Regards

Luis

0 Kudos
1 Reply

247 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hello Luis,

I took the example gpio_led_output of the SDK for the board LPC845MAX. By default the example is working with the green led (P0_0) but I changed two defines to work with the blue led (P1_15) and everything worked fine. Here are the defines that I modified: 

#define APP_BOARD_TEST_LED_PORT 1U
#define APP_BOARD_TEST_LED_PIN 15U

Once I make these changes when I click SW2 the blue led starts to blink. I recommend you to check this example to see what you are missing that is causing the hardfault on your side. 

Link to download the SDK.

Hope it helps!

Victor.

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

----------------------------------------------------------------------------------------------------------------------- 

0 Kudos