Where do driver files come from? LPC11EXX migration from LPC1114

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

Where do driver files come from? LPC11EXX migration from LPC1114

2,125 Views
accelmotion
Contributor III

I have some experience with a set of apps for the LPC1114 family under LPCXpresso (currently 8.2.2), but have recently redesigned for a LPC11E67 100pin device to get access to more peripherals.

With the previous versions I was able to move projects from one LPC1114 size to another and the CMSIS peripheral libraries all worked the same way, but when i created a new LPC11E6X project, there were no driver .h and .c files created by the wizard, and the older driver files used a slightly different Type/TypeDef distinction in the libraries, so they didn't work. 

The older files don't work, and the wizard didn't create any new ones for the LPC11E6X. 

What am I missing about how the LPCXpresso wizard and the libraries work? GPIOs are different between the LPC1114 and LPC11E/U units, but there's no new GPIO.H and GPIO.C file to instantiate the locations and references. 

Can anyone point me in the right direction about this?

David

Labels (3)
10 Replies

1,974 Views
lpcxpresso_supp
NXP Employee
NXP Employee

The LPC11E6x family are quite different to the earlier LPC11E1x/2x/3x devices. And you need to ensure that you use the LPC11E6x wizards, not the LPC11Exx ones.

But that aside, the older "CMSIS" peripheral libraries were not created for LPC11E6x devices, only LPCOpen libraries. Thus you will generally need to use LPCOpen with these devices.  You should also note that you will need to use the LPC11U6x LPCOpen library as there isn't an LPC11E6x version (LPC11E6x is basically the same as LPC11U6x, but without the USB peripheral system).

Finally, I would recommend the use of MCUXpresso IDE for any new development work, rather than the old LPCXpresso IDE product.

Regards,

MCUXpresso IDE Support

1,974 Views
accelmotion
Contributor III

I am aware of the differences in the chips and LPCOpen, but as I clearly stated I want to use existing program already written with expectation of changing only the hardware abstraction layer, which is what CMSIS and LPCOpen are supposed to be for.

What you are saying is false - these families are similar enough that they should be able to use CMSIS or other libraries with small changes.

Does anyone know where the files in the driver area come from, and if any CMSIS-Core files support the LPC11E or 11U series and could substitute for the older LPC1114 files I already have? I don't want to start over with LPCOpen as I have a complete LPC1114 build that works.

0 Kudos

1,974 Views
accelmotion
Contributor III

In reviewing the LPC11Exx.h file provided in the CMSIS by the wizard, the address of the GPIOs is same as the LPC1114 and not the location and organization shown in the datasheet for the LPC11E6X series. It shows a location of 5000 0000, where the databook says it's A000 0000. I am really lost as to the libraries and their possible use.

What's the point in the chip file being provided if the accompanying GPIO.h and GPIO.c files are not updated?

Also,  why is the chip file wrong?

0 Kudos

1,974 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

"

LPC11Exx.h file provided in the CMSIS by the wizard, the address of the GPIOs is same as the LPC1114 and not the location and organization shown in the datasheet for the LPC11E6X series. It shows a location of 5000 0000, where the databook says it's A000 0000. "

Please send a set of screenshot of above word. or a video is ok as well.

I will try to reproduce your issue and check it on my side.

Best Regards

Jun Zhang

0 Kudos

1,974 Views
accelmotion
Contributor III

pastedImage_1.pngpastedImage_2.pngpastedImage_3.png

0 Kudos

1,974 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

David,

Thanks. but from your screenshot I can't know where is the code from. Did you get this code from nxp website? Please let me know where did you download it, thus I can check it directly.

Thanks

Jun Zhang

0 Kudos

1,974 Views
accelmotion
Contributor III

Are you kidding?

These are the files that the wizard generates when you choose CMSIS and not LPCOpen. The LPC11E6X selection gets this LPC11EXX file that does NOT match the actual product. Why?

1,974 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Thanks for your clarification.

I have reproduced this issue and reported it to development. Please manually revise it for your case.

I will let you know if any update.

Best Regards

Jun Zhang

0 Kudos

1,974 Views
converse
Senior Contributor V

LPC11Exx and LPC1114 are different chips with different peripherals and so not directly compatible. For software I suggest you use LPCOpen - as you will see there are different versions of LPCOpen for LPC11Exx and LPC1114 (and other LPC11 devices)

LPCOpen Software for LPC11XX | NXP 

0 Kudos

946 Views
pentleman
Contributor I

Looking for LPCopen for LPC11EXX, the link referenced pulls up the download page which does NOT have an LPCopen distribution that supports LPC11EXX. 

The closest I've found is lpc11c24.   Attempting to use the lpc11c24 LPCopen library results in hardfault errors when attempting to use GPIO APIs.    Tracing back, there are #Defines that reference LPC11EXX, however when Define with a compiler option, build errors happen.   There are also warnings that the LPC11EXX support is not tested.

For instance, in chip.h:

#if defined(CHIP_LPC11EXX) 

#warning The LPC11EXX code has not been tested with a platform. This code should \

build without errors but may not work correctly for the device. To disable this \

warning message, define ENABLE_UNTESTED_CODE.

#endif

In addition to seeing the warning at compile time, there are a number of compile errors, for example:

../src/gpio_11xx_1.c: In function 'Chip_GPIO_SetDir':
../src/gpio_11xx_1.c:80:13: error: subscripted value is neither array nor pointer nor vector
80 | pGPIO->DIR[portNum] |= bitValue;
| ^
../src/gpio_11xx_1.c:83:13: error: subscripted value is neither array nor pointer nor vector
83 | pGPIO->DIR[portNum] &= ~bitValue;
| ^
../src/gpio_11xx_1.c: At top level:
../src/gpio_11xx_1.c:99:6: error: conflicting types for 'Chip_GPIO_SetPortDIR'
99 | void Chip_GPIO_SetPortDIR(LPC_GPIO_T *pGPIO, uint8_t port, uint8_t pinMask, bool outSet)
| ^~~~~~~~~~~~~~~~~~~~

 

Is there guidance on using LPCopen lpc11c24 chip library configured for lpc11e13/301 with no board library.   I'm using the latest MCUxpresso.

 

Thanks,

Thom

0 Kudos