Gast
#509708
Hi ! Ich bin auf der Suche nach den Settings für CONF_CANBT1 CONF_CANBT2 CONF_CANBT3 für einen AT90CAn128 mit FOSC == 15000 und einer Baudrate von 500 KBit. Ich bin zu blöd, um das auzurechnen. Hier die "originalen" Werte aus can_drv.h #if FOSC == 16000 //!< Fclkio = 16 MHz, Tclkio = 62.5 ns # if CAN_BAUDRATE == 500 //!< -- 500Kb/s, 8x Tscl, sampling at 75% # define CONF_CANBT1 0x06 // Tscl = 4x Tclkio = 250 ns # define CONF_CANBT2 0x04 // Tsync = 1x Tscl, Tprs = 3x Tscl, Tsjw = 1x Tscl # define CONF_CANBT3 0x13 // Tpsh1 = 2x Tscl, Tpsh2 = 2x Tscl, 3 sample points # elif CAN_BAUDRATE == CAN_AUTOBAUD // Treated later in the file # define CONF_CANBT1 0x00 // Unused # define CONF_CANBT2 0x00 // Unused # define CONF_CANBT3 0x00 // Unused # else # error This CAN_BAUDRATE value is not in "can_drv.h" file # endif #elif FOSC == 12000 //!< Fclkio = 12 MHz, Tclkio = 83.333 ns # if CAN_BAUDRATE == 500 //!< -- 500Kb/s, 12x Tscl, sampling at 75% # define CONF_CANBT1 0x02 // Tscl = 2x Tclkio = 166.666 ns # define CONF_CANBT2 0x08 // Tsync = 1x Tscl, Tprs = 5x Tscl, Tsjw = 1x Tscl # define CONF_CANBT3 0x25 // Tpsh1 = 3x Tscl, Tpsh2 = 3x Tscl, 3 sample points # elif CAN_BAUDRATE == CAN_AUTOBAUD // Treated later in the file # define CONF_CANBT1 0x00 // Unused # define CONF_CANBT2 0x00 // Unused # define CONF_CANBT3 0x00 // Unused # else # error This CAN_BAUDRATE value is not in "can_drv.h" file # endif