Why LPCOpen doesn't match declarations of UM?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Why LPCOpen doesn't match declarations of UM?

337 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by 1234567890 on Sun Apr 20 00:43:19 MST 2014
Hello,

I'm starting to switch from CMSIS to LPCOpen (or at least getting an overview of LPCOpen).
And instantly the first ugly thing from my point of view: In UM10398 for the LPC11Cxx the register SYSMEMREMAP is loacted in chapter SYSCON (chapter 3). So logically in CMSIS the way to access this register is LPC_SYSCON->SYSMEMREMAP.
In LPCOpen the way is LPC_SYSCTL->SYSMEMREMAP. Pretty confusing. UM and driver mismatch. May be there are good reasons for that change (I'm just starting ...) and it will be clarified later on my way. If so, spontaneous, the chapter in the UM should be renamed to System control (SYSCTL).
Labels (1)
0 Kudos
3 Replies

300 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by 1234567890 on Fri May 02 00:31:52 MST 2014
Edit: My posting below belongs to a deleted posting.

The #ifndef is a good solution at the first glance. But what's about the (much better than CMSIS) documentation in the next step? I think a consequent cut would be the best solution. Having an up-to-date UM is not as hard (if there is not a weekly cycle or so ...). The revision history is the right place for such a change.

Another 'dislike' for me are the just found power up functions, .e.g.
Chip_SYSCTL_PowerUp(SYSCTL_POWERDOWN_WDTOSC_PD);
For powering up something I have to use a 'POWERDOWN' macro.
0 Kudos

300 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Pacman on Mon Apr 21 16:20:31 MST 2014
#ifndef LPC_SYSCTL
#define LPC_SYSCON LPC_SYSCTL
#endif


... or the other way round.

I would really prefer using the "old names"; those that are in the existing User-Manuals.
-But if two User-Manuals have different namings, then the above #define would allow for both.
The worst problem is proably the FIOPIN, PIN, PIN[n], etc...
-Those can't be made portable in a convenient way, unless using inline functions or #defines to set/get values, clr/set/toggle bits, etc.
0 Kudos

300 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nxpsupport on Mon Apr 21 14:47:00 MST 2014
That is a good question.  The mismatches with the User Manual are a code legacy issue.  We are looking at how to correct these while not breaking code compatibility. 

Best regards,
-NXP Support
0 Kudos