Disable FS85 watchdog in normal mode for in-vehicle programming

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Disable FS85 watchdog in normal mode for in-vehicle programming

531 Views
noobsplzwin
Contributor III

Hi NXP team,
We are using FS8530 with S32k344, and we have ported the sample FS85 k1 driver to k3. I am trying to implement the in-vehicle programming mentioned in the AN12333 application note 5.2.

For testing purposes, implemented the following sequence right after a good watchdog refresher in normal mode
1. writing the GOTO_INITFS bit in the FS_SAFE_IOs register
2. Disabling the Watchdog refresher by writing 000 to FS_WD_WINDOW register
3. Stop the watchdog periodic timer channel, which enables the watchdog refresher based on the WD_PERIOD defined previously.

I am facing the problem that after this piece of code is flashed to the MCU. MCU would periodically turn on and off. It looks like SBC is entering the standby mode right after booting up, and because Wake1 is still high, SBC would turn back on and enter into standby mode again.

I have attached the piece of code with comments for the reference.  Could you help check if this is the correct sequence to enter init_fs and disable the watchdog in normal mode for programming?  Any help would be appreciated. 

noobsplzwin_0-1710714551126.png

Thanks,
Connor

0 Kudos
Reply
5 Replies

490 Views
guoweisun
NXP TechSupport
NXP TechSupport

Hi Connor

Please see below comment for your question:

1:I noticed INIT Phase has a 256 ms open window to receive a watchdog refresher. do I need to send another good watchdog refresher after the watchdog is disabled to exit the INIT Phase? 

[gw]Yes, correct you need one time refresh WD to exit this INIT phase.

0 Kudos
Reply

518 Views
guoweisun
NXP TechSupport
NXP TechSupport

Hi 

In the INIT phase, please try to disable FCCU function also.

0 Kudos
Reply

502 Views
noobsplzwin
Contributor III

Hi @guoweisun 

I disabled the FCCU function before disabling the watchdog. SBC still behaves the same.

The sequence is updated as following

1. writing the GOTO_INITFS bit in the FS_SAFE_IOs register

status |= FS8x_ReadRegister(drvData, true, FS8X_FS_SAFE_IOS_ADDR, &rxData);
 /* Go to INIT_FS and disable the watchdog for programming purposes*/
 uint16_t gotoIntFS = rxData.readData | 0x4;
 status |= FS8x_WriteRegister(drvData, true, FS8X_FS_SAFE_IOS_ADDR, gotoIntFS);

2. Disable the FCCU function

/* Disable the FCCU for programming purpose*/
status |= FS8x_ReadRegister(drvData, true, FS8X_FS_I_SAFE_INPUTS_ADDR, &rxData);
uint16_t disableFCCU =rxData.readData & 0x3FFF;
status |= FS8x_WriteRegister(drvData, true, FS8X_FS_I_SAFE_INPUTS_ADDR, disableFCCU);

3. Disabling the Watchdog refresher by writing 000 to FS_WD_WINDOW register

/* Disable the watchdog before leaving the debug mode */
uint16_t disableWatchdog = FS8X_FS_WD_WINDOW_DISABLE | FS8X_FS_WDW_DC_50 | FS8X_FS_WDW_RECOVERY_DISABLE;
status |= FS8x_WriteRegister(drvData, true, FS8X_FS_WD_WINDOW_ADDR, disableWatchdog);


4. Stop the watchdog periodic timer channel. MCU should stop sending watchdog refresher right after

Pit_Ip_StopChannel(PIT_INST_0, CH_0);


Btw, I noticed INIT Phase has a 256 ms open window to receive a watchdog refresher. do I need to send another good watchdog refresher after the watchdog is disabled to exit the INIT Phase? 

Thanks,

Connor

0 Kudos
Reply

489 Views
noobsplzwin
Contributor III

Hi @guoweisun,

With the i2c sequence mentioned above, the SBC still behaves the same. It would periodically turn on/off after booting up. Could you help to check if am I missing any steps here?

After the watchdog is disabled, Can the MCU continue to send watchdog refresh, or does the MCU need to start program flashing immediately?

0 Kudos
Reply

453 Views
guoweisun
NXP TechSupport
NXP TechSupport

Hi

If no OV/UV issue about regulators or monitors channels, after one good WD refresh SBC enter into release FS0B/FS1B status, in this phase you need continue to refresh WD till the fault error counter decrease into '0' then execute the release FS0B/FS1B command, above success enter into normal mode.

0 Kudos
Reply