TJA1145 wakeup frame filter isn't as expectation

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

TJA1145 wakeup frame filter isn't as expectation

682 Views
phuong_nguyenle
Contributor II

I have problem with wakeup frame.

I configured this way:

- CanId: 0x400

- Canid mask: 0x3FF

- DLC: 0

But i tested i see that all canid with any dlc can wakeup tja1145.

Is there any wrong with these configuration?

I'm so confused.

Tags (1)
0 Kudos
3 Replies

539 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Dear Phuong Nguyen Le,

sorry for a late reply. Could you please provide the configuration code and a CANID you are sending as a test after the configuration? Thank you.

With Best Regards,

Jozef 

0 Kudos

540 Views
phuong_nguyenle
Contributor II

Here is my spi command for this (When I request sleep):

    0x1400,       // Reg:0x0A Lock control. Spi write access enable
    0x4e00,   // Reg 27 Identifier 0
    0x5000,   // Reg 28 Identifier 1
    0x5200,   // Reg 29 Identifier 2
    0x5410,   // Reg 2A Identifier 3
    0x5600,   // Reg 2B Mask0
    0x5800,   // Reg 2C Mask1
    0x5afc,   // Reg 2D Mask2
    0x5c0f,   // Reg 2E Mask3
    0x5e40,   // Reg 2F Frame control
    0xd000,   // Reg 68 Data Mask0
    0xd200,   // Reg 69 Data Mask1
    0xd400,   // Reg 6A Data Mask2
    0xd600,   // Reg 6B Data Mask3
    0xd800,   // Reg 6C Data Mask4
    0xda00,   // Reg 6D Data Mask5
    0xdc00,   // Reg 6E Data Mask6
    0xde00,   // Reg 6F Data Mask7
    0x4601,        //Enable wakeup feature
    0xc2ff,   // Reg 61 clear register and old errors
    0xc6ff,   // Reg 63 clear register and old errors
    0xc0ff,   // Reg 60 clear register and old errors
    0xc8ff,   // Reg 64 clear register and old errors
    0x0201,       // Reg 1 Mode control : Sleep command
    0x147F   // 11 Reg:0x0A Lock control. Spi write access disable

Then when wake-up, i sent any CanID with any DLC and CanTrcv always is waken-up

0 Kudos

540 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Dear Phuong Nguyen Le,

 

I think you need to set bits PNCOK and CPNC in CAN control to 1 to enable selective wake-up frame.

imageFile.png

The CMC bits in CAN control should be set to offline CMC=00.

OperatingModes.png

So I suggest to add a line of code before Enable wakeup feature. 0x4070.

 0x1400,       // Reg:0x0A Lock control. Spi write access enable
    0x4e00,   // Reg 27 Identifier 0
    0x5000,   // Reg 28 Identifier 1
    0x5200,   // Reg 29 Identifier 2
    0x5410,   // Reg 2A Identifier 3
    0x5600,   // Reg 2B Mask0
    0x5800,   // Reg 2C Mask1
    0x5afc,   // Reg 2D Mask2
    0x5c0f,   // Reg 2E Mask3
    0x5e40,   // Reg 2F Frame control
    0xd000,   // Reg 68 Data Mask0
    0xd200,   // Reg 69 Data Mask1
    0xd400,   // Reg 6A Data Mask2
    0xd600,   // Reg 6B Data Mask3
    0xd800,   // Reg 6C Data Mask4
    0xda00,   // Reg 6D Data Mask5
    0xdc00,   // Reg 6E Data Mask6
    0xde00,   // Reg 6F Data Mask7

    0x4070,   // Reg 20 CAN control
    0x4601,        //Enable wakeup feature
    0xc2ff,   // Reg 61 clear register and old errors
    0xc6ff,   // Reg 63 clear register and old errors
    0xc0ff,   // Reg 60 clear register and old errors
    0xc8ff,   // Reg 64 clear register and old errors
    0x0201,       // Reg 1 Mode control : Sleep command
    0x147F   // 11 Reg:0x0A Lock control. Spi write access disable

With Best Regards,

Jozef 

0 Kudos