Software apps and online services
Debugging the protocol is always a headache, when it's come to sensors and controllers it's harder.
You won't believe me, I spent almost 4 months to debug this one. But I just figured the issue within 1 hour by using the Analog Discovery 2 hardware.The Bug 🐛:
I was trying to connect the M5Unit V2 with the Blues Notecard, but I don't know why my Notecard is not responding bad thing is I don't have any instrument to debug the communication, so I just used my another controller to communicate with that, but it works well. So now I'm more confused. I tried almost one month to solve this, then I just put it as draft 😂.Solution 🚀:
Finally, I brought a new Analog Discovery 2 from one of the local seller, this is one of my good investment of 2022. It's in the December last week. So I tried to use my AD2 to debug the above issue on January 1st 2023. I just spent approximately 1 hour on the AD2, that's all the is resolved.
Just download the Waveforms software from the Digilent website and install on your PC.
Next connect the AD2 with PC and open the Waveforms software. First it will try to identify the device, then it will open the dashboard.
Then connect the jumper cables with AD2 and connect the IO pins 1, 2 to the Rx and TX pins and Gnd to Gnd of the AD2. That's all you need to debug the UART protocol.
UART is a one of the most popular communication protocol among the embedded systems, it's easy to configure and use.
Open the Protocol debug display on the Waveforms software and select the Rx and Tx pinout according to the connection and next thing is select the baud rate.
Baud rate is defining the data communication speed between the master and slave
Next, just start the communication process and observe the data in waveforms software. I can see my data from the controller, but still my Notecard is not listening to the controller command.
If you want to look at the binary transactions means, Just go back to the dashboard and open the logic analyzer and configure the channels as same as before.
So I just ensure my controller is fine, the issue is with Notecard setting.
Then I tried multiple debug process.
- Swapping Rx TX pins.
- Using separate power supplies.
- Using different cables.
- Different command execution time.
You know what that is the issue here, “baud rate”. Yeah, you heard it right. My notecard is only work with 9600 Baud rate.
Then I change the baud rate in my controller and surprisingly it worked.