FreescaleCAN using in MCF51JM128VLH

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

FreescaleCAN using in MCF51JM128VLH

ソリューションへジャンプ
3,569件の閲覧回数
sudhanshumehta
Contributor IV

Hi Team,

I am using MCF51JM128VLH microcontroller.

I am trying to utilize FreescaleCAN from processor expert.

I am able to transmit and receive the data from CAN.

Now I am trying to use “Acceptance code” and “Acceptance mask”. I am not able to use.

Please see picture and code below.

I want to receive data only from 0x41 and 0x523 message ID. But I am able to receive all data

My Code at CAN interrupt is following.

Rx interrupt is working correctly as expected. But it is receiving all the data. I want to filter messages.

if (FGen_GetStateRX() &  <Something related to mask/acceptance filter shall be here. What is that> ) // this function is called at rx interrupt and working correctly.

{

  reply = FGen_ReadFrame(&ID, &type, &format, &len, buff);

}

1 解決策
3,327件の閲覧回数
sudhanshumehta
Contributor IV

Google "Using MSCAN on the HCS12Family"  this is application note "AN3034".

I got solution from here.

Thanks a lot from support.

元の投稿で解決策を見る

6 返答(返信)
3,327件の閲覧回数
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Sudhanshu Mehta,

Please remember that the values for setting the acceptance and mask registers should be formatted to fit the identifier registers format.

pastedImage_1.png

So you should consider the remote transmission request (RTR), Identifier extension (IDE) and Substitute remote request (SRR) bits in your acceptance code.

Also, please notice that the acceptance filters are applied to the message before it is processed by the msCAN receive ISR.

You can use as reference the source code and documentation from the Coldfire V1 msCAN Drivers:

ColdFire V1 msCAN Drivers

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
3,327件の閲覧回数
sudhanshumehta
Contributor IV

Hi Team,

I thank you for response,

ColdFire V1 msCAN Driver​  you provided does not contain any source code example.

I want to understand the concept.

My specific problem is

I am using standard frame only

My requirement is slightly changed. Now I want to receive data from 4 IDs. 0x101, 0x102, 0x103, 0x104.

What shall be the value of

Acceptance Code 1"

Acceptance Code 2"

Acceptance mask 1", 

"Acceptance Mask 2"

Additionally please also let me know if there is any flag that i need to check if correct data is received or not.

Thanks

Sudhanshu

0 件の賞賛
返信
3,327件の閲覧回数
sudhanshumehta
Contributor IV

I am not using MQX.

0 件の賞賛
返信
3,328件の閲覧回数
sudhanshumehta
Contributor IV

Google "Using MSCAN on the HCS12Family"  this is application note "AN3034".

I got solution from here.

Thanks a lot from support.

3,327件の閲覧回数
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Sudhanshu Mehta,

Is good to hear you that the application note was helpful. Regarding the source code, please run the "setup.exe" file after downloading the software from ColdFire V1 msCAN Drivers . A new folder with the source code and documentation will be created on the path "C:\Program Files\Freescale\msCAN Driver\MCF51 (ColdFire V1)"

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

0 件の賞賛
返信
3,327件の閲覧回数
soledad
NXP Employee
NXP Employee

Hello sudhanshu mehta,

Are you using MQX?

Regards

Sol

0 件の賞賛
返信