LPC1768 IRC+debuging

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

LPC1768 IRC+debuging

1,028 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NeoKlin on Sun Feb 20 08:35:30 MST 2011
Hello All!
Today I am debuging my application by LPCxpresso debuger connected to owned board with external 12MHz oscillator but final solution should run on internal. Does it possible to debug with internal oscilator.if so what kind of changes required in my code?
0 Kudos
Reply
5 Replies

974 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Albert on Mon Feb 21 06:09:07 MST 2011
Hi all,

My doubts can be obvious for someone.

I have a little of doubts about the flash programing methods.

When I debug my code with JTAG or SWD these methods program the code in the flash automatically, but how? They call the IAP command for do the program?

IAP comand can just write and erase data in the flash, or it can program the code in the flash as ISP? What the function of IAP?

I read on a docment that if you put 0 on P0.22 after reset the ISP mode is called and know as "first boot", but in the same condition the processor can enter on IAP mode, which is know of "Second boot" . How can I enter on the "second boot"?

Thanks.
0 Kudos
Reply

974 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NeoKlin on Mon Feb 21 02:29:52 MST 2011
Thank you,Zero! I will check it in low and high temperature in order to sure.
0 Kudos
Reply

974 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sun Feb 20 23:19:12 MST 2011
No. CAN and USB are more difficult and require higher accuracy (CAN: 1.58% USB: 0.25%).


Quote:

...high speed communication 11500 baud...



Is this a typo? 11.5 kbps shouldn't be a problem.

IRC should work with +-1% accuracy. (Datasheet: 1 % accuracy over the entire voltage and temperature range).

Older datasheets showed a table (accuracy versus temperature) with higher accuracy above 10°C. So I don't know how cold it is in Prague today :) (since we have damned cold -9°C in Germany) and if you use your LPC outside, but for 11 kbps that's no problem.

I've used UART with 115200 bps and IRC without problems.

If you are not sure if your system is accurate enough, calculate the baud rate error (see user manual), add IRC accuracy and check if that's still allowed for your system (datasheet?).
Everything below 3% should work for standard UART.
0 Kudos
Reply

974 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NeoKlin on Sun Feb 20 16:58:19 MST 2011
Thank you for your answer,understood.
I have additional question regarding to IRC.In my application I am using 2 UART channels for high speed communication 11500 baud (it's kind of gateway).From LPC1768 user manual I found that IRC should not be used with
the CAN1/2 and USB communications.Could this issue somehow related to USART also?
0 Kudos
Reply

974 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sun Feb 20 10:33:10 MST 2011
1. Switch Clock Source Select register (LPC_SC->CLKSRCSEL) to Internal RC (4MHz)

2. Calculate new LPC_SC->CCLKCFG

If you use CMSIS this is done in SystemInit() (system_LPC17xx.c).

If you change CLKSRCSEL_Val from 1 to 0 Internal RC is used as Clock source.

Note: 4MHz IRC is just 1/3 of 12MHz crystal. If you want to run 100MHz again just change PLL0CFG_Val from 0x00050063 to 0x00010063 (divider is changed from 6 to 2), clean and build project again.
0 Kudos
Reply