I am very new to this type of work. In the hope of adding an I2C display to my remote control drone, I've been diving into the software that runs it and more recently, J-Link EDU. I was hoping to step through code in the area that tries to interface with the I2C display.
I have recompiled the C code and flashed it on the usual USB interface provided by the drone.
The guts of the drone, a board running a STM32F303CC processor, has pads labelled SWDIO, SWCLK, NRST, GND, and 3.3. This is in addition to boot pins that can be shorted to force the bootloader into a state to receive new code if the usual usb interface is not able to connect.
Through various guides, I'm pretty sure I've connected my J-Link EDU properly to the pads. I first added 100k pull up resistors to SWDIO, SWCLK. I latter changed this to 4.7k. I verified that the pads do in fact connect to the microprocessor at the correct spots. I've even tested the NRST pin by grounding it and seeing that it does in fact reset the CPU.
When I use the J-link commander to connect to the board, I am not able to get any sign of connection.
Wires connected to these pads connect to the J-link edu cable. I'm suspecting that the j link box is broken. I've ordered a stm 32 discovery board to test. I've noticed that I can consistently reset the processor by grounding the NRST pin. When this is connected to the J-link, there is never a reset actually performed. I'm wondering if the J-link is even strobing the reset pin as I understand that it has a bunch of different strategies based off this action to allow it to connect to the SWD interface.
I'm tempted to buy an oscilliscope to test if there is a reset strobe on the j link pin, pin 15
How long would the j-link hold this pin low to force a reset, can i test this with a multimeter or do i need an oscilliscope. In any case, the connected processor does not reset by j link as evidenced by its usual beeps.
Could there be any kind of code protection bits that prevent a jlink connection? Saw something about this somewhere.
The drone software is open source, i don't know about the bootloader.
Does the boot loader even get run if the j link resets and connects to swm like it should? I would think it breaks right in the bootloader.
My hope is to set a break point in my c code and step over the bootloader to the i2c area. Do I even need a bootloader? Can I use j link (or j flash) to place the C code in the drone where the bootloader is now and step through it?
Once this works, hopefully, is it reasonable to assume that I should be able to break on lines that talk to the i2c display and, if working, step line by line and watch text and pixels be placed on the display? is there any kind of a timing thing starting and stopping the cpu, but not the display?
Thanks,
Jeff
I have recompiled the C code and flashed it on the usual USB interface provided by the drone.
The guts of the drone, a board running a STM32F303CC processor, has pads labelled SWDIO, SWCLK, NRST, GND, and 3.3. This is in addition to boot pins that can be shorted to force the bootloader into a state to receive new code if the usual usb interface is not able to connect.
Through various guides, I'm pretty sure I've connected my J-Link EDU properly to the pads. I first added 100k pull up resistors to SWDIO, SWCLK. I latter changed this to 4.7k. I verified that the pads do in fact connect to the microprocessor at the correct spots. I've even tested the NRST pin by grounding it and seeing that it does in fact reset the CPU.
When I use the J-link commander to connect to the board, I am not able to get any sign of connection.
Wires connected to these pads connect to the J-link edu cable. I'm suspecting that the j link box is broken. I've ordered a stm 32 discovery board to test. I've noticed that I can consistently reset the processor by grounding the NRST pin. When this is connected to the J-link, there is never a reset actually performed. I'm wondering if the J-link is even strobing the reset pin as I understand that it has a bunch of different strategies based off this action to allow it to connect to the SWD interface.
I'm tempted to buy an oscilliscope to test if there is a reset strobe on the j link pin, pin 15
How long would the j-link hold this pin low to force a reset, can i test this with a multimeter or do i need an oscilliscope. In any case, the connected processor does not reset by j link as evidenced by its usual beeps.
Could there be any kind of code protection bits that prevent a jlink connection? Saw something about this somewhere.
The drone software is open source, i don't know about the bootloader.
Does the boot loader even get run if the j link resets and connects to swm like it should? I would think it breaks right in the bootloader.
My hope is to set a break point in my c code and step over the bootloader to the i2c area. Do I even need a bootloader? Can I use j link (or j flash) to place the C code in the drone where the bootloader is now and step through it?
Once this works, hopefully, is it reasonable to assume that I should be able to break on lines that talk to the i2c display and, if working, step line by line and watch text and pixels be placed on the display? is there any kind of a timing thing starting and stopping the cpu, but not the display?
Thanks,
Jeff