cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F446ZET - CAN TX works in Loopback Mode but not in Normal Mode

CBrun.5
Associate II

Hi,

Im struggling to get the CAN to run on the F446ZET micro, it runs all day long transmitting in loopback mode but doesnt work at all in Normal Mode.

Looking on a scope trace of the TX pin in loopback you can see the couple of messages im transmitting going consistently. Putting it into normal mode i see a section of the messages sent.

Scope trace taken at the TX Pin input to the Transceiver.

Im using a Ixxat VCI and Busmaster to interpret the messages and get nothing on there and the Ixxat VCI reports bus off when in normal mode.

Ive tried the bus terminated and un terminated, different baud rates and nothings changing.

The project is using a PCA82C251T/YM CAN Transceiver - https://www.mouser.co.uk/datasheet/2/302/PCA82C251-1127535.pdf

It uses the RS pin as a 'Mode Selection' it is pulled to ground which is putting it in high speed mode.

Any advice welcome, im going to add scope traces shortly.

Thank you

Chris

3 REPLIES 3

Needs to be another device on the bus that's responding.

Perhaps look what the actual Error / Status is reporting when you try this.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
CBrun.5
Associate II

The HCAN Error Status was equal to timeout, but this is after a period of time not initially so i should still see some messages. Ive fixed this with just delaying the TX with a while if no mailboxes are available. This is the only error ive got.

The VCI should act like another device on the bus? Ive used this setup numerous times with other projects and had no issues before :( - Even on another STM. Admittedly using a TJA1043 Transceiver

CBrun.5
Associate II

Ive checked the status of the registers against the datasheet,

I can confirm that the CAN peripheral is in normal mode, the error status is 0 within the can instance its self is 0 and never reaches an error handling condition.

However, within the ESR register, the LEC (Last Error Code) and this indicates a stuff error. Googling seems to indicate that its another device isnt Acking the messages. Is there anything else it could be? Ive used the VCI and Busmaster for years and never ran into this issue. Checking the baud rate all seems correct. So im not sure where to check now.