Hi,
Is there a way to read the chips serial number so I can display it on CAN?
Thanks!
Solved! Go to Solution.
Hello @Poley ,
I've seen that error before but I was unable to solve it because I cannot reproduce it on my end.
Regarding reading the UID, the other way s to use Data Read Mem block and type the direct address of the registers. Please see the attached example.
For the second request, restarting the MCU there are basically two ways. One of them is to use the watchdog, the other is to use the AIRCR register of the ARM Core. I tried the last one, and if you press the SW4 this should reset the MCU. Please see the attached exmaple. Also, the count variable is incremented every step time so once you press the button the value starts again from 0.
Hope this helps,
Marius
Hello @Poley
I think you can try using the Read Register block and accessing the SIM -> UIDH, UIMH, UIML and UIDL.
Hope this helps,
Marius
I get this error when trying to put a read register block in my model, am I missing something obvious?
Also, Is there a way to do a device reset from software? I am looking at ways to flash with the CAN bootloader and using a reset switch isn't ideal (8 boards on same bus and supply so can't just power cycle). So a way of resetting the device through software would be perfect.
Thanks!
Hello @Poley ,
I've seen that error before but I was unable to solve it because I cannot reproduce it on my end.
Regarding reading the UID, the other way s to use Data Read Mem block and type the direct address of the registers. Please see the attached example.
For the second request, restarting the MCU there are basically two ways. One of them is to use the watchdog, the other is to use the AIRCR register of the ARM Core. I tried the last one, and if you press the SW4 this should reset the MCU. Please see the attached exmaple. Also, the count variable is incremented every step time so once you press the button the value starts again from 0.
Hope this helps,
Marius
Thank you very much for the help!
So it looks like if I use the reset function you have:
It looks like I can just change the GPI ISR to a CAN signal that when set to 1 triggers the subsystem containing the reset MCU matlab function, should this reset me all the way to the bootloader code? (Currently just using OpenSDA).
Also for UID do I need to read all 4 registers?:
How do I get a single value I can put onto CAN? or is that value too large?
Thank you again!