LPC11C14 CAN onchip only in debug mode

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC11C14 CAN onchip only in debug mode

2,372件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sa.ha on Thu Oct 24 12:07:16 MST 2013
Hello, I have tried the example project "can_onchip" in LPCXpresso with the LPCXpresso LPC11C24 Development Board (using only the LPC Link, no connections to the LPC11C24 target board). I'm using my own LPC11C14 board which is connected to the LPC Link via a SWD-Cable.  I have changed the CAN bus baudrate to 500k. The problem is that the programm runs only in debug mode with connected LPC Link. I can send and receive data but when I disconnect the LPC Link from my LPC11C14 board and power off, then power on my board the CAN connection does not work. I can't send or receive CAN messages. All other programm parts are working. (toggle Pin every 10ms, which I can see on the scope)
Then I tried the "can" example project and all works fine (debug and standalone mode).
I have read something about semihosting. Could this be the problem? How can I disable it? I searched the forums but couldn't find any solution. I hope someone can help me.
ラベル(1)
0 件の賞賛
返信
22 返答(返信)

2,207件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mahalinr on Wed Oct 30 06:12:54 MST 2013

Quote: mahalinr
Hi

           I am using LPC11c14 Can open in eclipse cdt software.

Can you please the ram,rom and sram origin address of this lpc11c14.

[u]MEMORY
{
  /* ram size has to be checked with SEGGER!!! */
  ram (rwx) : ORIGIN = 0x100000C0, LENGTH = 8k   /*initial value of the stack pointer (SP) can be read from 0x20000000 and the initial value of the PC can be read from 0x20000004*/
  /* last 2 pages reserved for persistent data storage (else LENGTH = 1024k )*/
  rom (rx) : ORIGIN = 0x00000000, LENGTH = 8k
  option_bytes_rom (rx) : ORIGIN = 0x1FFF4000, LENGTH = 16k
  extnor (rx) : ORIGIN = 0x40000000, LENGTH = 32k
  extsram (rwx) : ORIGIN = 0x10000000, LENGTH = 32k
  extnand (rx) : ORIGIN = 0x70000000, LENGTH = 20k
}

The folllowing is the memory address i am using.

Though i am able to compile,while debugging it displays that memory cannot be accessed.

I have attached the output error.

Plz help me out

thx in advance


0 件の賞賛
返信

2,207件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mahalinr on Wed Dec 18 02:05:13 MST 2013
It means a kind of sending messages to the PCAN USB continously and simultaneously receiving the messages from PCAN to the Microcontroller.
0 件の賞賛
返信

2,207件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by 1234567890 on Tue Dec 17 10:12:46 MST 2013
Well, you simply repeated your question.
What exactly do you mean with 'auto addressing'? Please discribe what you mean.
0 件の賞賛
返信

2,207件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mahalinr on Tue Dec 17 03:38:57 MST 2013
I have asked that anybody has any idea about the Auto addressing in the BUS system
0 件の賞賛
返信

2,207件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by 1234567890 on Mon Dec 16 10:58:06 MST 2013
And what have you asked for?
0 件の賞賛
返信

2,207件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mahalinr on Tue Dec 03 06:11:07 MST 2013
Thankyou

But this is not what I was asking for
0 件の賞賛
返信

2,207件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by clkunde on Tue Dec 03 06:02:06 MST 2013
Read this paper. I believe will help you.

http://ojs.academypublisher.com/index.php/jcm/article/view/jcm0710765773

Best Regards,

Claudio Kunde
0 件の賞賛
返信

2,207件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mahalinr on Tue Dec 03 05:55:09 MST 2013
Anyone has idea about Auto Addressing in CANOpen?
0 件の賞賛
返信

2,207件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by 1234567890 on Sun Nov 24 04:07:21 MST 2013

Quote: mahalinr
Hi
/* ram size has to be checked with SEGGER!!! */
   ram (rwx) : ORIGIN = 0x100000C0, LENGTH = 8k



8 k isn't correct; must be 8 k - 0x000000C0
0 件の賞賛
返信

2,207件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Thu Oct 31 06:09:39 MST 2013
After drawing dozens of different LPC11C14 boards since 2010 I never heard about this problem.

So I'm convinced that this is a workaround for another problem...
0 件の賞賛
返信

2,207件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sa.ha on Thu Oct 31 05:18:11 MST 2013

Quote: R2D2

Quote: sa.ha
It looks like that the uC does no power-on-reset after a power-on of the whole board.



Then it's time to check your Reset- and ISP-Pin (= pullups)...



I think I have found the problem. It was no hardware problem. After power-on of the whole board, the uC does a power-on-reset. All software-parts were working (except the CAN-part). The CAN part was only working after an external reset at the reset-pin. I solved this by adding a delay of at least 15ms before the CAN initialization in the main() function.

int main(void) {
...
        delay32Ms(0,15);
/* Initialize the CAN controller */
(*rom)->pCAND->init_can(&ClkInitTable[0], 1);
...
}


I don't know why but the programm is working now. Thank you for your support
0 件の賞賛
返信

2,207件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mahalinr on Wed Oct 30 00:07:46 MST 2013
Hi

           I am using LPC11c14 Can open in eclipse cdt software.

Can you please the ram,rom and sram origin address of this lpc11c14.

[u]MEMORY
{
  /* ram size has to be checked with SEGGER!!! */
  ram (rwx) : ORIGIN = 0x100000C0, LENGTH = 8k   /*initial value of the stack pointer (SP) can be read from 0x20000000 and the initial value of the PC can be read from 0x20000004*/
  /* last 2 pages reserved for persistent data storage (else LENGTH = 1024k )*/
  rom (rx) : ORIGIN = 0x00000000, LENGTH = 8k
  option_bytes_rom (rx) : ORIGIN = 0x1FFF4000, LENGTH = 16k
  extnor (rx) : ORIGIN = 0x40000000, LENGTH = 32k
  extsram (rwx) : ORIGIN = 0x10000000, LENGTH = 32k
  extnand (rx) : ORIGIN = 0x70000000, LENGTH = 20k
}

The folllowing is the memory address i am using.

Though i am able to compile,while debugging it displays that memory cannot be accessed.

I have attached the output error.

Plz help me out

thx in advance
0 件の賞賛
返信

2,207件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue Oct 29 06:19:38 MST 2013

Quote: sa.ha
It looks like that the uC does no power-on-reset after a power-on of the whole board.



Then it's time to check your Reset- and ISP-Pin (= pullups)...
0 件の賞賛
返信

2,207件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sa.ha on Tue Oct 29 06:13:30 MST 2013
Thank you for your help. I found out that the programm runs in release mode, but only if I pull the reset-pin of the uC to ground after a power on. The uC should run without an external reset. It looks like that the uC does no power-on-reset after a power-on of the whole board. This is the problem.
0 件の賞賛
返信

2,207件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue Oct 29 02:04:01 MST 2013
There are several changes in your project:

#1 Why did you include DSP-Lib? If you don't need it, don't include it.

#2 SystemInit() is called twice. You don't need to call it in your main. Cr_startup... is doing that for you.

#3 You've changed Reset IOCON to default (pullup). That's not necessary.

#4 Meanwhile you have destroyed your clockout setup. If you don't need clockout, delete that.

After importing your project and changing this points above, your project is working here (Debug and Release).

Note: I didn't import your CMSIS_CORE lib, instead using the default Lib.

BTW: It's enough to reserve 192 bytes:

//reserve ROM-RAM 0x1000 0050 - 0x1000 00B9
__BSS(RESERVED) char CAN_driver_memory[0xC0];



0 件の賞賛
返信

2,207件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sa.ha on Tue Oct 29 00:14:17 MST 2013
my project
0 件の賞賛
返信

2,207件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Mon Oct 28 11:59:40 MST 2013

Quote: sa.ha

I hope someone has an idea to fix this.



If you think it's no hardware problem then just export and post this project...
0 件の賞賛
返信

2,207件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sa.ha on Mon Oct 28 11:43:30 MST 2013
update: The last days I tried to get the onchip CAN drivers to run. I created a new LPCXpresso project (Redlib (none)) and added the driver files. I followed the instructions in the link to reserve the memory for onchip CAN drivers. But it still runs only in debug mode. In debug mode I can see the data packets on can_tx port of the LPC11C14 with an oscilloscope. With an CAN-USB-Interface (PCAN-USB from PEAK Systems) I get the correct messages from the uC. The CAN_TX and CAN_RX ports are connected to a digital isolator (Silabs SI8422BD-B-IS) and a CAN-transceiver (NXP TJA1051T/3) .
When I restart the System (power off and then Power on) without any connection to the LPC-Link-board there is a straight line on the scope at about 2.5V on the can_tx port. (no packet are sent) I think, that it can't be a hardware issue because it runs in debug mode. It looks like as if only the onchip CAN driver is not running.
I hope someone has an idea to fix this.
0 件の賞賛
返信

2,207件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mahalinr on Mon Oct 28 09:21:40 MST 2013
How to install SWD in LPC11C14
0 件の賞賛
返信

2,207件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Thu Oct 24 13:10:41 MST 2013
This CAN samples are over 3 years old. I would strongly suggest to generate a new LPCXpresso project and add driver files there.

How to use CAN with 'Managed linker script' is described here:

http://www.lpcware.com/content/forum/how-to-reserve-lpc11cxx-ram

0 件の賞賛
返信