Jump to content

Changing the baud rate of PmodCan.

Recommended Posts

I am trying to change the Baudrate of the PmodCan to suit my application needs. I could see that i can change the Baudrate by tweaking the registers CNF1 though CNF3. I dont understand this line of code 

u8 CNF[3] = {0x86, 0xFB, 0x41}; 

CAN_WriteReg(InstancePtr, CAN_CNF3_REG_ADDR, CNF, 3); 

I see that only the register CNF3 is being written, however in the reference manual it has been mentioned that with the above code all three registers are being written. 

Assuming the registers being set to the above values, how is the CAN clock set to a frequency of 20MHz?. With the above register values i get a Nominal bit time(NBT) of 21TQ. if oscillator frequency is assumed to be 100MHz(Max for PmodCan) then the baud rate comes out to be approximately 1250 Kbits/s. However with zynq processors the operating baud rate is declared as 115200. Can you please explain what i am missing here or where i am going wrong?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...