About the chip-18xx_43xx source file from lpcopen prohect

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

About the chip-18xx_43xx source file from lpcopen prohect

622 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pra18 on Thu Jul 24 01:58:52 MST 2014
hi all,

There is a file chip_18xx_43xx.c in the lpcopen example projects of the Hitex 4350 board. Does this file a library file that is to be used directly into a particular application that we are developing or it is a specific file to the Hitex 4350 board.

If this file is specific to the Hitex board, then what is the alternate solution? Do we need to create a new source file and try to port the functions from this file?

Thanks and Regards,


Labels (1)
0 Kudos
7 Replies

579 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nerd herd on Tue Jul 29 12:36:00 MST 2014
Hello,

Are you talking about the clock_18xx_43xx.c and chip_18xx_43xx.c that are both located in the lib_lpc_chip_43xx? They perform two different operations. The clock_18xx_43xx.c performs various clock operations related to the clock generation unit and clock control unit while the chip_18xx_43xx.c initialized the USB PLLs as I said before. If you're confused about the clocking methodology in the LPC43xx, Chapter 12 and 13 of the user's manual talk about clocking in depth:

http://www.nxp.com/documents/user_manual/UM10503.pdf

You should be able to modify them to your specific platform, however I don't think the code in either of these files are board dependent. I may be wrong, however. You can change their file names if you want, but you would have to also change any references to the old file names.
0 Kudos

579 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pra18 on Tue Jul 29 12:10:22 MST 2014
hi,

Just to let know what the confusing part is,  we have a clock_18xx_43xx.c and then in chip folder  we have chip_xxx version of this file.
what is thie diff. between these 2 files.

if I want to use a file chip_xxx which in turn calls into clock xxx ,then are these 2 files example sources for a board or can I take them just as they are and of course modify platform specific parts.

can I also change filenames or its standard library filenames

thanks,
0 Kudos

579 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nerd herd on Tue Jul 29 10:39:00 MST 2014
Hello,

It sounds to me that you have some sort of custom board and are trying to use LPCOpen code on it to avoid writing your own peripheral drivers. Is this correct? If you are using the LPC43xx, you should be able to reuse most of the LPCOpen code. Depending on what your application requires, you may just need to check to see which pins you need to initialize for certain peripherals. What I would do is choose a simple example in LPCOpen, such as the blinky example in the peripherals examples, and transpose the code to make it work on your board. The blinky example should just use a timer and GPIOs, so that could work out of the box if the MCU is hooked up correctly. If the blinky does not work, please post what issues you are seeing and we can hash it out together. :)
0 Kudos

579 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pra18 on Tue Jul 29 03:56:25 MST 2014
Hi,
I have already included manyof the peripheral files beginning with name lpc43xx_rgu, lpc43xx_uart.c etc...  into my build. i newly wanted to add a functionality and whn I looked at it, it will require the functions implemented in a chip_18xx_43xx.c file. I am not sure whether to include this file in its original form into the build doubting that thisfile may be board specific or call some functions in board.c which is a board specific file.

Please suggest what could be the workaround in this regard.

Regards,
0 Kudos

579 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nerd herd on Fri Jul 25 08:36:13 MST 2014
Hello,

I downloaded version 2.04 of LPCOpen for the 43xx Hitex board and looked at chip-18xx_43xx.c. It seems to just enable USB PLLs which is not board dependent by itself. However, it uses many API calls from other files, such as clock_18xx_43xx.c, so you would have to include these as well. Note that including these will likely require you to include others, which will lead to a domino effect. Hope this helps!
0 Kudos

579 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pra18 on Thu Jul 24 10:49:42 MST 2014
Hi,

The file in question is from the lpcopen_2_04 zipped version downloaded from the lpcware site. Can we use this file as it is in our implementations or i this a Board specific file?

Regards,
0 Kudos

579 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nerd herd on Thu Jul 24 08:52:42 MST 2014
Hello,

There are many revisions of the LPCOpen software platform, so just to make sure we are looking at the same file, what version of LPCOpen are you looking at? I'm looking at version 2.12 and from what I can gather, it seems to just initialize the USB PLL's which should not be board dependent. I downloaded the Keil board examples and the chip_18xx_43xx.c is identical. Hope that helps!
0 Kudos