AT90CAN128 Problem With CAN initialization
Posted: 02 Nov 2021 05:02
Hi,
I started using mikroc Pro for AVR this week and I am trying to test CAN communication between two AT90CAN128 boards. I am not new to CAN protocol, previously is was using Mikroc for ARM and CANbus had no issues with STM32F407 MCU. However, I had to shift to AVR due to the global chip shortage issue. First, I had faced issues with the initialization of UART with Mikroc for AVR libraries. UART was unable to send data and I had to use register addressing to make my own functions to get UART working. and Now when I started using CAN libraries, similar issue is happening. CANtx is not sending anything, I have checked with oscilloscope and it shows no data. For reference, I am using sample codes given for BIGAVR6. the only thing I changed is that I am using 16Mhz Crystal OSC instead of 8MHz clock.
Fuse bits are as follows.
LOW = 0xFF = 1111 1111
HIGH = 0xD9 = 1101 1001
EXTENDED = 0xFF = 1111 1111
Circuit has not problem since the same circuit for STM32 with Mikroc for ARM was working perfectly fine. It seems like AT90CAN128 is not initializing CAN and UART with giving libraries. Kindly help.
I started using mikroc Pro for AVR this week and I am trying to test CAN communication between two AT90CAN128 boards. I am not new to CAN protocol, previously is was using Mikroc for ARM and CANbus had no issues with STM32F407 MCU. However, I had to shift to AVR due to the global chip shortage issue. First, I had faced issues with the initialization of UART with Mikroc for AVR libraries. UART was unable to send data and I had to use register addressing to make my own functions to get UART working. and Now when I started using CAN libraries, similar issue is happening. CANtx is not sending anything, I have checked with oscilloscope and it shows no data. For reference, I am using sample codes given for BIGAVR6. the only thing I changed is that I am using 16Mhz Crystal OSC instead of 8MHz clock.
Fuse bits are as follows.
LOW = 0xFF = 1111 1111
HIGH = 0xD9 = 1101 1001
EXTENDED = 0xFF = 1111 1111
Circuit has not problem since the same circuit for STM32 with Mikroc for ARM was working perfectly fine. It seems like AT90CAN128 is not initializing CAN and UART with giving libraries. Kindly help.