LPC1519 CAN LPCOpen vs Legacy

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

LPC1519 CAN LPCOpen vs Legacy

14,871件の閲覧回数
stephendgb
Contributor II

Hello, 

I am working with a legacy code that has included some drivers for the LPC1519. Some of these drivers have been modified over the years as the programing method used has changed in style. All of these drivers mostly translate the new LPCOpen library by using the API and the defines associated with each peripheral to configure them. There is one peripheral however that is not present in the LPCOpen library, that is the CAN. The previous API/Drivers my code was using was referencing the same memory address that is defined for the base address of LPC_C_CAN0_BASE. The LPCOpen library does however include reference to the ROM based API for CAN. Even the Documentation (UM10736) references the peripheral and its register addresses. There are also example codes using this. 

Is this peripheral driver deprecated for any reason in particular? Should I be using the ROM based API? Can utilizing the same driver as the code was using before (given it's the same memory address) cause conflicts or unforeseen issues? 

Best regards,

SG

ラベル(3)
タグ(1)
0 件の賞賛
返信
8 返答(返信)

14,641件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @stephendgb 

Sorry I'm not sure the legacy driver, recommend use CAN API under LPCopen.

 

BR

Alice

0 件の賞賛
返信

14,766件の閲覧回数
MartinHo
Contributor IV

Hi

Some Years ago (2017) I had the same problem, after test's using the ROM API with no sucess (I'm using FreeRTOS). I decided to update to the latest LPCOpen version (2.20?) and adding manually the CCAN driver from a older version (this older version seems to be no longer available for download!, I’m using MCUXpresso/LPCXpresso).

If You are interested in the ccan_15xx.c / ccan_15xx.h file's I can upload then.

best regards

Martin

0 件の賞賛
返信

14,623件の閲覧回数
stephendgb
Contributor II

Hi Martin, 

Yes, these are the drivers I am looking for. Mine seem to be modified from their original version and I don't want to speculate or start from a position where I use botched drivers. I have been able to see some drivers that I recognize in uVision from ARM by downloading the CMSIS-DFP Pack. But I can't access all of them there. Namely the CAN one. Could you please upload the version you have? 

It's a shame these older drivers are not easy to find. 

Best regards, 

SG

0 件の賞賛
返信

14,582件の閲覧回数
MartinHo
Contributor IV

Hi Stephan,

With no warranty, the drivers from NXP I'm using in my application.

I'm attaching the chip.h file as "reminder" that you have to define the Base Address for C_CAN0.

Martin

0 件の賞賛
返信

14,470件の閲覧回数
stephendgb
Contributor II

Thank you Martin !!

0 件の賞賛
返信

14,825件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @stephendgb 

Could you please tell me  what is the drivers you used before? 

 

BR

Alice

0 件の賞賛
返信

14,469件の閲覧回数
stephendgb
Contributor II

Hi Alice, 

These are sort of the drivers I am looking for. But in the install directory and in the legacy folder the LPC15xx family is not covered. 

0 件の賞賛
返信

14,797件の閲覧回数
stephendgb
Contributor II

Hi Alice, 

Honestly, it's not clear to me where these drivers came from fully. However, the descriptor of the chip is a generated file name LPC15xx.h (included). On the top of this file, it mentions that it was created in 2012 using SFDGen. I belive these might be of CMSIS drivers on Keil that I could find but maybe an older version. I am not sure if it was copied over exactly from here.

The drivers/API for the peripherals are in the similar style as those of the LPCOpen in terms of functionality with some clear modifications that have been made by some previous developers that worked on this code. 

Best regards, 

SG 

 

 

0 件の賞賛
返信