Hi, I am developing a board that has a S32K344 and a FS26. I initially added the Sbc_fs26_ip driver in the MEX configuration tool, and used the same code as the provided in the SBC_fs26_IP example project (leaving here too...), which just initializes the FS26 via SPI device.
eReturnValue = Sbc_fs26_Init(&Sbc_fs26_xConfig);
eReturnValue |= Sbc_fs26_InitDevice();
if(eReturnValue != E_OK)
{
bPass = FALSE; /* Error during initialization. */
}
After succeeding the FS26 initialization I went back to the MEX file and enabled the watchdog, without modifying my code to add the watchdog refresh logic, so I could see the FS26 resetting the S32K344 due to lack of WD refreshing.
However, after I did this, I could no longer flash the S32K344 (leaving the debugger console log below). I am trying too to run a debug configuration in RAM instead of in flash just in case it has something to do with the FS26 resetting the device, but no luck. The only thing I can seem to do is to disable the 'Load executable' and enable the 'Attach to Running Target' in the debug configuration. This allows me to connect to the target and pause execution, BUT it seems to be stuck in a code line (unrelated to interrupts or other special feature) and clicking the Restart/Rerun button would simply go to the exact same line.
What is more strange is that this is happening with the jumper configuration set to Debug mode for the FS26 (I suspect however that this is happening because of not refreshing the WD in the first 256 ms window). I also tried to flash a simple 'Hello World' project, but I can't, and I can see the previous code being executed whenever I reset the device (I can see the S32K344 configuring the FS26 with an oscilloscope attached to the SPI lines).
I think that I could fix the problem by erasing the flash of the S32K344 so that it doesnt configure the FS26 before attaching debugger. But cant find a way to do it. Is there any other possible solution to this?
Connection from "127.0.0.1" via 127.0.0.1. Connection from port "51480" to 6224
Connection from "127.0.0.1" via 127.0.0.1. Connection from port "51482" to 7224
PE-ERROR: Warning. Can't read registers while part is running.
PE-ERROR: Warning. Can't read memory while part is running. @0 (4 bytes)
PE-ERROR: Warning. Can't read registers while part is running.
Telnet server running on 127.0.0.1:51794
Searching for Kernel Symbols...
rsp_qC - qSymbol: 5F74785F7468726561645F63757272656E745F707472
_tx_thread_current_ptr not found. ThreadX analysis not enabled.
rsp_qC - qSymbol: 707843757272656E74544342
pxCurrentTCB not found. FreeRTOS analysis not enabled.
PE-ERROR: Warning. Can't read memory while part is running. @4074f0 (2 bytes)
PE-ERROR: Warning. Can't read memory while part is running. @402db0 (2 bytes)
PE-ERROR: Warning. Can't Write Binary while part is running. 0 - Length of: 0 - Value of: Binary Data
PE-ERROR: Warning. Can't Write Binary while part is running. 0 - Length of: 3b8 - Value of: Binary Data
Unable to load libusb0.dll
Copyright 2024 P&E Microcomputer Systems,Inc.
Command Line :C:\NXP\S32DS.3.6.0\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_5.9.5.202412131551\win32\pegdbserver_console -device=NXP_S32K3xx_S32K344 -startserver -singlesession -serverport=7224 -gdbmiport=6224 -interface=USBMULTILINK -speed=5000 -port�
PEmicro Interface detected - Flash Version 11.37
CMD>RE
Initializing.
INFO: DAP IDCODE = 0x6BA02477
INFO: DAP successfully powered up. DP CTRL/STAT = 0xF0000000
Target has been RESET and is active.
CMD>CM C:\NXP\S32DS.3.6.0\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_5.9.5.202412131551\supportFiles_ARM\NXP\S32K3xx\nxp_s32k344_1x32x1012k_hse_disabled.arp
Initializing.
INFO: DAP IDCODE = 0x6BA02477
INFO: DAP successfully powered up. DP CTRL/STAT = 0xF0000000
Initialized.
;version 1.03, 11/05/2024, Copyright 2024 P&E Microcomputer Systems, www.pemicro.com [S32K3x4_hse_disabled]
;device nxp, s32k344, 1x32x1012k,desc=hse_disabled
;begin_cs device=$00400000, length=$003F4000, ram=$20400000
Loading programming algorithm ...
Error loading .ARP file : C:\NXP\S32DS.3.6.0\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_5.9.5.202412131551\supportFiles_ARM\NXP\S32K3xx\nxp_s32k344_1x32x1012k_hse_disabled.arp at address 20400002
Error loading programming algorithm - load aborted.
Error occured during Flash programming.
INFO: DAP IDCODE = 0x6BA02477
INFO: DAP successfully powered up. DP CTRL/STAT = 0xF0000000
Starting reset script (C:\NXP\S32DS.3.6.0\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_5.9.5.202412131551\supportFiles_ARM\NXP\S32K3xx\S32K344.mac) ...
REM Enable clocks for selected cores in MC_ME module
Delaying for 200mS ...
Done.
REM Initialize RAM and DMA:
REM Initialize DMA TCD:
REM Copy valid executable code to RAM for each core to be used.
REM Enable required cores in MC_ME:
Delaying for 20mS ...
Done.
Reset script (C:\NXP\S32DS.3.6.0\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_5.9.5.202412131551\supportFiles_ARM\NXP\S32K3xx\S32K344.mac) completed.
PEmicro GDB Launch Failure : Error during flash programming. Terminating debug session.
PE-ERROR: Error downloading to the device. Terminating debug session.
INFO: DAP IDCODE = 0x6BA02477
INFO: DAP successfully powered up. DP CTRL/STAT = 0xF0000000
PE-ERROR: Warning. Can't read memory while part is running. @408a00 (64 bytes)
PE-ERROR: Warning. Can't read memory while part is running. @408afe (2 bytes)
Disconnected from "127.0.0.1" via 127.0.0.1. Disconnection by port "51480" from 6224
Disconnected from "127.0.0.1" via 127.0.0.1. Disconnection by port "51482" from 7224
INFO: DAP IDCODE = 0x6BA02477
Target Disconnected.
Solved! Go to Solution.
Hi
Which development board are you using?
Although the FS26 enters debug mode according to the EVB User Manual, your program will cause FS26 exit debug mode and enter normal mode.
It is recommended to disconnect the reset signal between FS26 and S32K344, and then enter debug mode to download a new program.
Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
I provide the following info just in case:
FCCU1->LOW
FCCU2->HIGH
RSTB->HIGH
INTB->HIGH
FS0B->LOW
FS1B->LOW
Hi
Which development board are you using?
Although the FS26 enters debug mode according to the EVB User Manual, your program will cause FS26 exit debug mode and enter normal mode.
It is recommended to disconnect the reset signal between FS26 and S32K344, and then enter debug mode to download a new program.
Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi, @Robin_Shen Thank you very much! It looks like this made it. I just removed the 0 Ohm resistor that connects the FS26 RSTB signal to the S32K344 RESET_b pin, and the problem was solved. Now I need to check why the FS26 keeps resetting the regulators when not in DEBUG mode, even if I disable the watchdog timer. Any ideas to know where to start from?
I support S32K but not familiar with FS26.
Please create a new question at https://community.nxp.com/t5/Power-Management/ct-p/Power-Management. I just mentioned your question to my colleague guoweisun.