I'm using S32 Design Studio for NXP MCU S32R372.
For some reason, I need modify some peripherals registers within the 256ms time window after MCU reset.
I modified the reset script file "S32e200_s32r372.mac"
For example, I add the two lines so as to write to register at 0xFFFC0240 and at 0xFFFC1300:
This means set PTA to output high.
mm.l 0xFFFC0240 0x02000000
mm.l 0xFFFC1300 0x01000000
I also modified the cflash algorithm file "Nxp_s32r372_1x32x328k_cflash.pcp".
Add the following two lines: (same meaning as above)
I saved these two files and start the debug/download process in S32DS.
I use an oscilloscope to monitor the RESET signal
I can see PTA output high after RESET signal released to high.
So I think the script modifications work as I expected.
During the S32DS download process, I found that the mac file run twice and pcp file run once.
But there are totally 5 reset pulses observed on oscilloscope.
I attached the waveform figure I captured during the process.
1st reset with mac file, 2nd reset no script, 3rd reset with pcp file, 4th reset no script, 5th reset with mac file.
My questions are:
1) Can I have the manual or guide to show the available commands in mac file and pcp file?
2) Why are there 5 resets occurred during the debug process and 2 resets maybe run no scripts?
3) The delay between RESET release and the write operation to register is too long (more than 200ms).
How can I reduce the delay? I want to have the write operation run immediately after reset.