AnsweredAssumed Answered

LPC845MAX board, strange result blinking blue led

Question asked by Luis Martinez on Aug 18, 2018
Latest reply on Aug 20, 2018 by Victor Jimenez

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

Outcomes