2019-02-13 01:37 AM
I am using truestudio and cubemx with STM32F103C8T6. I am trying to use canbus. If I connect the cantx and canrx pins on A12 and A11 (as shown in attached cubemx file), I get an output that looks like a can frame, but has peak voltage of 400mV.
cubemx file and a zip of project is attached, does anyone have any idea what could be the problem?
there were some resistors for usb on the board, but I removed them. I am programming with stlink v2 with swd
also, it is running at something like 83 kHz. I used this (http://www.bittiming.can-wiki.info/) website to calculate values, but I'm not sure what to put for clockrate since cubemx clock configuration doesn't mention canbus anywhere and looking at all the datasheets and guides I could I couldn't figure out what clock the canbus uses.
Does anyone know where I can find what clock the canbus is using?
Solved! Go to Solution.
2019-02-14 12:16 AM
I figured out the problem with voltage too low. Can transceiver wasn't working because power wasn't present, and tx voltage looked like it was slightly below 400mV because my oscilloscope probe was set to 10x attenuation.
2019-02-14 12:16 AM
I figured out the problem with voltage too low. Can transceiver wasn't working because power wasn't present, and tx voltage looked like it was slightly below 400mV because my oscilloscope probe was set to 10x attenuation.