This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Not able

pls help...

i'm working on LPC1114-FBD/301 series

On my board 4 LED's are connected to P0_8, P0_9, P0_10, P0_11.

I'v written a sample code toggle them. Only on 8 and 9 port pin LED's are blinking
but on 10 and 11 there state is always on. here is the sample code

/* by default P0_8 and P0_9 pins are GPIO's */ LED_DIR |= BIT(8); LED_DIR |= BIT(9);

/* 9th and 10th pins are not GPIO's on reset */ // i think here some changes required to make them as GPIO's IOCON_SWCLK_PIO0_10 |= 0x1; IOCON_R_PIO0_11 |= 0x1;

LED_DIR |= BIT(10); LED_DIR |= BIT(11);

Parents
  • You are just refusing to try any debugging?

    No verification that the registers you perform logical or/and operations on really have the values you assume? Not considering performing an assign instead of a logic or for IOCON_R_PIO0_11 and IOCON_SWCLK_PIO0_10?

    No test of GPIO0DATA? If port is output, then you should be able to set bits and read back the same value. If port is input, then your writes should be thrown away. If port isn't GPIO but special function, then read should correspond to the actual value of the pin (even if driven by special function).

    No verification that your LED are connected to the correct pin?

    No verification which instruction in the program that makes the LED turn off?

    Is GPIO0DATA at the base address? It can be any address between 0x5000:0000 and 0x5000:3ffc and the address of GPIO0DATA will affect which bits of the port that may be accessed or masked away. Maybe you use GPIO0DATA as address 0, in which case all writes are blocked.

    No verification that PIO:11 isn't in analog mode?

    Don't you get it - you have to do debugging. We can't remote-debug your code.

Reply
  • You are just refusing to try any debugging?

    No verification that the registers you perform logical or/and operations on really have the values you assume? Not considering performing an assign instead of a logic or for IOCON_R_PIO0_11 and IOCON_SWCLK_PIO0_10?

    No test of GPIO0DATA? If port is output, then you should be able to set bits and read back the same value. If port is input, then your writes should be thrown away. If port isn't GPIO but special function, then read should correspond to the actual value of the pin (even if driven by special function).

    No verification that your LED are connected to the correct pin?

    No verification which instruction in the program that makes the LED turn off?

    Is GPIO0DATA at the base address? It can be any address between 0x5000:0000 and 0x5000:3ffc and the address of GPIO0DATA will affect which bits of the port that may be accessed or masked away. Maybe you use GPIO0DATA as address 0, in which case all writes are blocked.

    No verification that PIO:11 isn't in analog mode?

    Don't you get it - you have to do debugging. We can't remote-debug your code.

Children