2020-09-15 02:14 AM
Dear Community,
I have started to use the STM Cube Monitor but I do not see through yet.
I want to monitor some input and output pins of a STM32F4 and therefore I need the HEX adresses to type in in the variable node. I think I have to use the register adresses for the pins which I can find in the IDR and ODR, right?
Example: On pin 8 of port B (adress range of GPIO B = 0x4002 0400 - 0x400207FF) which is configured as an Output a LED is connected blinking at 1 Hz. The register offset for the ODR is 0x14. Which adress do I have to enter in the varibale node in the cube monitor?
I found a formula to calculate the adress which says:
adress = start_adress + (register_offset x 32 + bit_number x 4)
and with that formula I got the adress 0x4002 06A0, which unfortunately did not work out. I got connection to my controller and the chart was "running", but no value was shown.
Is that correct so far or where are the errors and how can I monitor I/O pins? I did not find information about my problem in the community or at the wiki, so I ask here.
I would really appreciate any help.
Greetings Max
Solved! Go to Solution.
2020-09-22 06:40 AM
Hello
I have tested with a Nucleo board, and it is working fine. I don't have the Led, but I can monitor the signal
1) load the basic flow
2) select the probe (myProbe_Out and myProbe_In)
Then to monitor ODR
3) In the variable node "myVariables" add in the Variable list a new variable ODR (with the button Add custom variable) :
Name : ODR, Strart Address 0x40020414, Type : unsigned 32-bit
Click on Done
4) Click on Deploy
5) Click on Dashboard
6) Click start acquisition
You should see the graph with signal toggling between 0 and 256
Stephane
note : You can also copy paste this flow, but do not forget to change probes for your device and then press deploy :
[{"id":"67fe38e2.cb8168","type":"tab","label":"Basic_Flow","disabled":false,"info":"# Basic flow to start with STM32CubeMonitor."},{"id":"405e2426.b7dd6c","type":"ui_chartst","z":"67fe38e2.cb8168","group":"6c6b2ced.0539c4","name":"myChart","order":4,"width":15,"height":9,"chartType":"line","curveType":"linear","duration":"10","ymin":"","ymax":"","x":580,"y":280,"wires":[]},{"id":"c0f9657d.1b8b48","type":"acquisition out","z":"67fe38e2.cb8168","name":"myProbe_Out","probeconfig":"f9ea9fed.8109e","x":520,"y":120,"wires":[]},{"id":"d3ab7ca6.454fb","type":"acquisition in","z":"67fe38e2.cb8168","name":"myProbe_In","probeconfig":"f9ea9fed.8109e","x":130,"y":280,"wires":[["4d76b505.80167c"],[]]},{"id":"fe6e51da.7a14e","type":"variables","z":"67fe38e2.cb8168","groupname":"myVariables","accesspoint":0,"execonfig":"","variablelist":[{"name":"ODR","address":"0x40020414","type":"5"}],"triggerstartmode":"manual","triggername":"ODR","triggerthreshold":"30000","frequency":"","frequencyType":"0","snapshotheader":"","mode":"direct","lastImportedTime":-1,"openStatus":true,"x":330,"y":120,"wires":[["c0f9657d.1b8b48"]]},{"id":"ccf865c2.adc458","type":"ui_button","z":"67fe38e2.cb8168","name":"","group":"6c6b2ced.0539c4","order":3,"width":5,"height":1,"passthru":false,"label":"Clear Graphs","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"clear","x":430,"y":380,"wires":[["405e2426.b7dd6c"]]},{"id":"24d7662d.5dbf2a","type":"ui_button","z":"67fe38e2.cb8168","name":"","group":"6c6b2ced.0539c4","order":1,"width":5,"height":1,"passthru":false,"label":"START Acquisition","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"start","x":110,"y":80,"wires":[["fe6e51da.7a14e"]]},{"id":"ebc77207.e4447","type":"ui_button","z":"67fe38e2.cb8168","name":"","group":"6c6b2ced.0539c4","order":2,"width":5,"height":1,"passthru":true,"label":"STOP Acquisition","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"stop","x":110,"y":160,"wires":[["fe6e51da.7a14e"]]},{"id":"4d76b505.80167c","type":"processing","z":"67fe38e2.cb8168","groupname":"myVariables","groupid":"d59587ff.cd1748","expressions":[],"statistics":[],"logmode":"no","x":390,"y":280,"wires":[["405e2426.b7dd6c"],[]]},{"id":"6c6b2ced.0539c4","type":"ui_group","z":"","name":"Chart","tab":"3ec93c5e.e0dcd4","order":1,"disp":true,"width":15,"collapse":false},{"id":"f9ea9fed.8109e","type":"probe","z":"","probeid":"066CFF485457725187132528","probename":"ST-Link v2-1B (...32528)","protocol":"SWD","frequency":"1.8 MHz - Default","probeproperty":"{\"SWD\":[\"4.6 MHz\",\"1.8 MHz - Default\",\"950 kHz\",\"400 kHz\",\"150 kHz\"],\"JTAG\":[\"18 MHz\",\"9 MHz\",\"4.5 MHz\",\"2.25 MHz\",\"1.12 MHz - Default\",\"560 kHz\",\"280 kHz\",\"140 kHz\"]}","probeversion":"ST Link firmware version V2.J36","connectionType":"p2p"},{"id":"3ec93c5e.e0dcd4","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]
2020-09-16 05:20 AM
Hello Max
You are right, you should be able to monitor the IO registers with STM32cubeMonitor.
The problem could be :
To write the register from STM32CubeMonitor, the register BSRR can be a nice option, because it will change only the bit you want, and will not changes other bits in the register.
Let me know if it solves your issue
Best regards
Stephane
2020-09-22 02:18 AM
Hello Stephane,
thanks for your fast reply.
Unfortunately it still does not work. The Controller is not in sleep mode and an LED connected to PB8 is flashing at 1Hz.
How can I monitor the signal of the LED? Do I have to change the program in the Cube Monitor IDE? I tried my tests with the basic flow, maybe there is my error? I also set the adress in the variable node to the start adress of GPIO Port B with the ODR offset, which then is 0x4002 0414.
Thanks for any help!
Best regards
Max
2020-09-22 06:40 AM
Hello
I have tested with a Nucleo board, and it is working fine. I don't have the Led, but I can monitor the signal
1) load the basic flow
2) select the probe (myProbe_Out and myProbe_In)
Then to monitor ODR
3) In the variable node "myVariables" add in the Variable list a new variable ODR (with the button Add custom variable) :
Name : ODR, Strart Address 0x40020414, Type : unsigned 32-bit
Click on Done
4) Click on Deploy
5) Click on Dashboard
6) Click start acquisition
You should see the graph with signal toggling between 0 and 256
Stephane
note : You can also copy paste this flow, but do not forget to change probes for your device and then press deploy :
[{"id":"67fe38e2.cb8168","type":"tab","label":"Basic_Flow","disabled":false,"info":"# Basic flow to start with STM32CubeMonitor."},{"id":"405e2426.b7dd6c","type":"ui_chartst","z":"67fe38e2.cb8168","group":"6c6b2ced.0539c4","name":"myChart","order":4,"width":15,"height":9,"chartType":"line","curveType":"linear","duration":"10","ymin":"","ymax":"","x":580,"y":280,"wires":[]},{"id":"c0f9657d.1b8b48","type":"acquisition out","z":"67fe38e2.cb8168","name":"myProbe_Out","probeconfig":"f9ea9fed.8109e","x":520,"y":120,"wires":[]},{"id":"d3ab7ca6.454fb","type":"acquisition in","z":"67fe38e2.cb8168","name":"myProbe_In","probeconfig":"f9ea9fed.8109e","x":130,"y":280,"wires":[["4d76b505.80167c"],[]]},{"id":"fe6e51da.7a14e","type":"variables","z":"67fe38e2.cb8168","groupname":"myVariables","accesspoint":0,"execonfig":"","variablelist":[{"name":"ODR","address":"0x40020414","type":"5"}],"triggerstartmode":"manual","triggername":"ODR","triggerthreshold":"30000","frequency":"","frequencyType":"0","snapshotheader":"","mode":"direct","lastImportedTime":-1,"openStatus":true,"x":330,"y":120,"wires":[["c0f9657d.1b8b48"]]},{"id":"ccf865c2.adc458","type":"ui_button","z":"67fe38e2.cb8168","name":"","group":"6c6b2ced.0539c4","order":3,"width":5,"height":1,"passthru":false,"label":"Clear Graphs","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"clear","x":430,"y":380,"wires":[["405e2426.b7dd6c"]]},{"id":"24d7662d.5dbf2a","type":"ui_button","z":"67fe38e2.cb8168","name":"","group":"6c6b2ced.0539c4","order":1,"width":5,"height":1,"passthru":false,"label":"START Acquisition","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"start","x":110,"y":80,"wires":[["fe6e51da.7a14e"]]},{"id":"ebc77207.e4447","type":"ui_button","z":"67fe38e2.cb8168","name":"","group":"6c6b2ced.0539c4","order":2,"width":5,"height":1,"passthru":true,"label":"STOP Acquisition","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"stop","x":110,"y":160,"wires":[["fe6e51da.7a14e"]]},{"id":"4d76b505.80167c","type":"processing","z":"67fe38e2.cb8168","groupname":"myVariables","groupid":"d59587ff.cd1748","expressions":[],"statistics":[],"logmode":"no","x":390,"y":280,"wires":[["405e2426.b7dd6c"],[]]},{"id":"6c6b2ced.0539c4","type":"ui_group","z":"","name":"Chart","tab":"3ec93c5e.e0dcd4","order":1,"disp":true,"width":15,"collapse":false},{"id":"f9ea9fed.8109e","type":"probe","z":"","probeid":"066CFF485457725187132528","probename":"ST-Link v2-1B (...32528)","protocol":"SWD","frequency":"1.8 MHz - Default","probeproperty":"{\"SWD\":[\"4.6 MHz\",\"1.8 MHz - Default\",\"950 kHz\",\"400 kHz\",\"150 kHz\"],\"JTAG\":[\"18 MHz\",\"9 MHz\",\"4.5 MHz\",\"2.25 MHz\",\"1.12 MHz - Default\",\"560 kHz\",\"280 kHz\",\"140 kHz\"]}","probeversion":"ST Link firmware version V2.J36","connectionType":"p2p"},{"id":"3ec93c5e.e0dcd4","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]
2020-09-22 09:36 PM
Hello Stephane,
thank you very much for your help!
Now it works like I expected.