4 years, 2 months ago.

Porting code from mbed LPC11U24 to LPC1114 on target application

I've written a small application on an mbed LPC11U24 device. It works perfectly.

I have modified the pin assignments to suit the LPC1114 device which is on my target board (I am using the SO28 device) and recompiled it for the LPC1114.

It loads perfectly into the target device using Tedd Okano's 'ika shouyou poppakai' ISP utility.

However, it does not work. It runs through the first few set lines of code and then hlts. I can see this because of the printf statements I inserted into the code that come back to Teraterm via the pass through mode on the ISP programmer. I initially thought that is was the printf statements - but if I comment these out, it still does not run.

I also note that pin 3 is not available when compiling on the LPC1114 platform because it is used by the mbed LPC1114 device. Even if I disable that pin (i.e. I don't use it), it still hangs.

What am I doing wrong? How can I free up all the pins on my target device?

You really need to give more information, this is essentially: It did work on device A, but not on device B, pls solve it.

If you do basic programs, does it work? Where does it stop functioning? Which pins are you talking about?

posted by Erik Olieman 15 Nov 2015

Erik, it works 100% correctly on the Mbed LPC11u24. When I recompile it for the 1114 and flash it it runs the first few lines and stops. Only digital I/O is used.

posted by Andrew R 15 Nov 2015

Again, you need to give more information than: It did work on device A, but not on device B, pls solve it. We don't know what your program does and what does/does not work.

posted by Erik Olieman 15 Nov 2015

Hello,

here is the link to my program

https://developer.mbed.org/users/andrewcrussell/code/RC5_AndrewR/

I have the program working on the LPC1114, but uis it very, very erratic. today I changed the chip ot, but it did not help.

It seems the response to IRQ's is the issue - somwetimes it works and the controller responds, otgher times it simply hangs up, and the only way out is to reset it.

I rechecked the LPC11U24 version on my proto board - it runs correctly.

So, I believe yjer issue is I have done something wrong with the irq's, or the LPC1114 handles them differently. One other Q from my side is how do I free up dp3 as well.

Note, I am using an LPC111 chip directly on my PCB - I am not using the Switch Science module.

posted by Andrew R 16 Nov 2015

Any comments/input on this? I have been going through my code today but no progress from my side

posted by Andrew R 17 Nov 2015

I have done some more work on this. The three pushbutton inputs go to P1_3, P1_5 and P0_7. When any of these are activated (active low), it hangs the program. By this, I mean it never exits the interrupt handler. I also note that I do not seem to be able to disable these IRQ's using the standard disable_irq(). I am selectively enabling and disabling specific interrupts using the my_interrupt.rise(&myint) and my_interrupt.rise(NULL) as and when required in the program.

The thing that I am not understanding is that the program runs 100% ok on the LPC11U24.

So, is there something specific I need to do on the LPC1114.

Any guidance/pointer would be appreciated.

posted by Andrew R 19 Nov 2015
Be the first to answer this question.