2019-08-19 06:29:58 +08:00
|
|
|
There seems to be no LPCOpen library for the LPC804:
|
|
|
|
https://www.nxp.com/design/microcontrollers-developer-resources/lpcopen-libraries-and-examples/lpcopen-software-development-platform-lpc8xx:LPCOPEN-SOFTWARE-FOR-LPC8XX
|
|
|
|
|
|
|
|
|
2019-08-16 05:50:08 +08:00
|
|
|
Source: LPC804-EX-CODE-MCUXPRESSO.zip from nxp.com
|
2019-08-19 06:29:58 +08:00
|
|
|
available from here:
|
|
|
|
https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc800-cortex-m0-plus-/low-cost-microcontrollers-mcus-based-on-arm-cortex-m0-plus-core:LPC80X?tab=Design_Tools_Tab#t749
|
|
|
|
"LPC804 Example Code Bundle MCUXpresso"
|
|
|
|
|
2019-08-16 05:50:08 +08:00
|
|
|
|
|
|
|
|
2019-08-17 19:52:06 +08:00
|
|
|
Toplevel include should be "LPC8xx.h".
|
|
|
|
The name "LPC8xx.h" might be misleading: This file is specific to the LPC804, but
|
2019-10-02 21:28:29 +08:00
|
|
|
I decided not to change the name, but keep the orginal file name from the above zip
|
2019-08-17 19:52:06 +08:00
|
|
|
folder. In fact plan is not to modify any of the files in lpc_chip_804 so that they can
|
|
|
|
be overwritten at any time with the original files (maybe chip_setup.h is an exception).
|
|
|
|
|
|
|
|
For some reason the variable "SystemCoreClock" is renamed to "main_clk".
|
|
|
|
|
|
|
|
While working in the code, I saw, that there are some issues in "lpc_chip_804":
|
|
|
|
- Removed includes of "utilities.h" because the funcionality is not called
|
|
|
|
- added inclusion of "swm.h" from "spi.h", because "spi.h" makes use of
|
|
|
|
some definitions from "swm.h"
|
|
|
|
- Removed "Config_Syspll" declaration from "syscon.h" because it is removed in the src.
|
|
|
|
- Alligned "unsigned int" with "uint32_t" declarations in syscon.h and .c
|
|
|
|
- Change the inclusion of "lpc8xx.h" to "LPC8xx.h" in i2c.h
|
|
|
|
|
2019-10-02 21:28:29 +08:00
|
|
|
As a conclusion, I had to change the following files compared to the original zip content:
|
2019-08-17 19:52:06 +08:00
|
|
|
i2c.h syscon.h syscon.c i2c.c spi.c spi.h plu.c
|
|
|
|
|
2019-08-16 05:50:08 +08:00
|
|
|
|