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 <skip> ......... t_count= 2148, TMR32B1= -2146948717 .......... t_count= 2149, TMR32B1= -2145903706 ......... t_count= 2150, TMR32B1= -2144958718 <skip> .......... t_count= 4292, TMR32B1= -2868706 ......... t_count= 4293, TMR32B1= -1923718 .......... t_count= 4294, TMR32B1= -878706 ......................................................................................................... <continue>
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.detach(); 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:
Please log in to post comments.
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.