Sprintf(buf,"Starting search_baudrate(clk: %lu, target baud_rate: %lu\r\n", clk, baud_rate ) Void search_baudrate2(uint32_t clk, uint32_t baud_rate) * According to the TI documentation you want the sample point TS1+2 to be 75% of 3 + TS1 + TS2 * And I am thinking you want the sum of TS1 + TS2 to be larger if the error is 0. ![]() * In an ideal world you want the error to be 0.00% * This calculates all of the usable combinations of BRP, TS1, and TS2. * The default values for BRP, TS1, and TS2 in the CAN MX program are not good. * This was easier to do in C than in a spread sheet. I tried to find the solutions with a spread sheet but soon decided a C program would be faster. No where in the documentation did it mention the target of the sample point should be 75%. Not by reading RM0390, but by reading TI documentation. STM32CubeMX - STM32 Device Configuration ToolĪttached is a screen shot of the MX Setup I am programming a STM32 Nucleo-F446RE and the CAN bus is running at 1 MHz Of course I would like to also know how to fix them. Where is Stuff error or Form error defined? If I do not know what it is how do I fix it? I have searched the entire 1347 page RM0390 Reference Manual and the only place Stuff error or Form error is mentioned is in the Error Status Register. ![]() it is either 0xFF000023 or 0xFF000013 which tells me that the LEC (Last error code) is either 001 Stuff error, or 010 Form Error. I set up a 16-bit List filter with 05A0, 0620, 0000, 0000.Īt this point I am only looking to see if the FIFO is not empty. ![]() The bus sniffer says the two addresses are 0x05A0 and 0x0620. About every millisecond the PC sends a command to the motor and the motor responds almost immediately. Looking at thedata with a CAN bus sniffer it looks like there are two messages going back and forth. For now all I want to do is read what is on the bus. I have a can bus operating between a PC and a Motor, where the PC can control the motor.Įventually I want the STM32 to control the motor.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |