LPC1114FN28 -> Suggestion for improvement

I like a mbed LPC1114FN28 because it's a reasonable price and easy to set up a own hardware using DIP chip solution.
If NXP agree to continue a chip production as long as possible, it's a good for week-end hobbyist.
I would like to report two issue which I have a trouble at this moment (as of November 15th, 2014) and I hope this will be solved by specialist.
1) dp23 (nR) -> nRESET/PIO0_0 pin usage
2) Ticker 32bit timer -> TMR32B1 usage

Suicide program

Current mbed LPC1114FN28 has a pin dp23 and looks like to assign DigitalOut function.
But this is very dangerous situation because if it sets to output port and set to low condition, CPU will never wake-up forever.
Here is a sample program and DON'T EXECUTE ON mbed !!

Import programLPC1114_suicide

This program will kill your mbed LPC1114FN28. Don't set dp23 as DigitalOut!! Don't run this program.

Simple solution
Do not alow to use this pin.
If someone would like to use special reset to CPU itself, anyway he or she need to know deep know-how for CPU reset manipulation by a software and they need to have a skill for it.

Ticker function problem

Here is a program to check the ticker function.
You need to watch over 71 minutes because 32bit timer ( TMR32B1) will make a overflow at the timing.

Import programLPC1114_ticker_bug_or_not

Current (on Nov. 15th, 2014) LPC1114 Ticker function has a trouble after one hour and 11 minutes after due to 32bit timer overflow. I hope this will be fine by mbed support team.

I executed the program and get following Tera Term screen shot.
Following a log data.

t_count=      45, TMR32B1=      45083590
t_count=      46, TMR32B1=      46028579
t_count=    2148, TMR32B1=   -2146948717
t_count=    2149, TMR32B1=   -2145903706
t_count=    2150, TMR32B1=   -2144958718
t_count=    4292, TMR32B1=      -2868706
t_count=    4293, TMR32B1=      -1923718
t_count=    4294, TMR32B1=       -878706

Last 4294 (sec) is 71.5166 minuets and it's 1 hour 11 minuets and around 31 seconds.
32 Timer (TMR32B1) counts 0xffff2978e value (int32_t -878706).
Next step will be;
-878706 + (-1923718-(-2868706)) = -878706+944988 = 66282 = (uint32_t)102ea <- 32 bit overflow
After report t_count=4294, Tera Term shows "................" only.
Ticker function doesn't reach to next tick time anymore.

Simple solution

// Insert following program in your program
        if (LPC_TMR32B1->TC >= 0xd693a400){   // every 1 hour
            // due to LPC1114FN28 Ticker function bug
            t.attach(&pulse_out, 0.1);  //  0.1sec is depends your own program

Request to a specialist

Please update the mbed related software for this problem.
Thanks your effort in advance.

6 comments on LPC1114FN28 -> Suggestion for improvement:

15 Nov 2014

The Ticker bug should be fixed in the latest mbed-src, I don't know if regular mbed already has the fix, but next version should have it for sure. (At least if it is due to the reason I think it is).

I agree dp23 indeed shouldn't be available by default.

15 Nov 2014

Hi Erik
Thanks your quick comments.
For Ticker problem, I will check next version.
At least, I have updated mbed library just before issue this comment and not work it.
The dp23 issue, it's very dangerous and I'm trying to make a rescue program but it's two much effort for me (still in my TO DO LIST).
This note is intended to make a caution for other users.

25 Nov 2014

I have a solution to fix a LPC1114FN28, which is dead due to dp23 issue: Bring it in ISP mode by connecting dp24 to low (by a 330Ohm resistor), and press the Reset button. You can reprogram it by default mbed USB drag-and-drop, although it is in ISP mode!

28 Nov 2014

The Ticker bug is now fixed in Rev.92 library.

04 Dec 2014

Hi Ulrich,
I'm so sorry not to replay until today.
Thanks your useful advice to avoid it.
I will try near future.
I will update this note when I can fix the problem using your advice.
Thanks lots.

04 Dec 2014

Hi Mimura-san, Thank you for your information. I also tried and confirmed it. I recognize that this is not specific problem for LPC1114 but also most of mbed chips. Thanks.

Please log in to post comments.