Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

CAN Clock Divider not doing anything on CANbus module

Status
Not open for further replies.

Diver300

Well-Known Member
Most Helpful Member
I've been using a dsPIC33CH128MP506 to do some CANbus communication.

It is capable of CAN-FD, and there are two separate baud rate dividers for the nominal baud rate and the data baud rate. They are:-
BRP (Baud Rate Prescaler) within C1NBTCFGH (CAN Nominal Bit Time Configuration Register High)
and
BRP (Baud Rate Prescaler) within C1DBTCFGH (CAN Data Bit Time Configuration Register High)
Both of these have a range of 1 - 256.

There is also CANCLKDIV (CAN Clock Divider Select bits) within CANCLKCON (CAN Clock Control Register) which has a range of 1 - 128.

As far as I can tell, CANCLKDIV does nothing at all. I've only been using normal CAN, not CAN-FD, and the BRP within C1NBTCFGH does what I would expect it to do.

It took me a bit of time to work out what was going on, as the baud rate was far too high.

The microcontrollers are developed from a mix previous designs. The processor is a 16-bit one, but the CAN module has what are in effect 32 bit registers, with pairs of 16 bit registers ending "H" and "L". I suspect that some parts of some registers have ended up unused, but that's not been documented.

I am wondering if anyone has seen anything like that, or have I missed something?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top