LPC1519 CAN LPCOpen vs Legacy

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

LPC1519 CAN LPCOpen vs Legacy

5,947 Views
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

Labels (3)
Tags (1)
0 Kudos
Reply
8 Replies

5,717 Views
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 Kudos
Reply

5,842 Views
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 Kudos
Reply

5,699 Views
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 Kudos
Reply

5,678 Views
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 Kudos
Reply

5,566 Views
stephendgb
Contributor II

Thank you Martin !!

0 Kudos
Reply

5,921 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @stephendgb 

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

 

BR

Alice

0 Kudos
Reply

5,565 Views
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 Kudos
Reply

5,894 Views
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 Kudos
Reply