I'm using HAL_CAN_transmit to send data for stm32L4 mcu. I'm trying to send frames with 2 bytes in an infinite loop.
I would like to know if it's possible and if feasible to measure TTL signal levels at GPIO TX pin of mcu board without having can controller connected within a can net. Or if these TTL signal levels will be down if no can receptor device is connected.
Before integrate mcu into a can net, I have thought about checking Tx pin when code is running, without being connected to any can transceiver, this means: out of a can net, looking directly to the board pinout. I'm looking at the mcu output directly, on GPIOs configured to be Tx CAN pin with an osc. With the same code sometimes I can see my data on osc screen. But sometimes I can't do. Micro seems to stop having data at this pin randomly. I debugged and all registers seems be all right: Data in mailbox, no error bits into ESR register, TX request launched, etc.
I'm not sure if it's robustness of my code or hardware influences the cause of this randomly output. I would like to ensure if microcontroller TX output (my choosen GPIO) musts show data signal independently of having connected to transceiver (and can-usb connector i. e.) as you can do when uses gpio for sending serie data through uart, etc. As you can see the gpio states when code runs without having connected anything, is it? Or only mcu drives the frame bits to its GPIO pin level values when a working CAN net is reciving the transmissions correctly?
Second part of mytest list will be connecting can-usb converter with the transceiver to the TX/RX mcu pins when I get the first stage test running correctly (watching the TTL levels of frame sent on osc screen). But, this is not the main thing now. I need to close the first step/question, before this.
I hope my doubt has been easily understood.
If there is any suggestion in order to clarify my question it will be grate and helpful.
Thanks in advance.