FS26 Amux sensing issue

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

FS26 Amux sensing issue

Jump to solution
896 Views
TTC_ZONE4
Contributor I

I am attempting to measure the voltage on the AMUX pin after routing the BAT sense voltage to it. I have verified all relevant register values, and the FS_STATES register reports the device is in Normal mode. However, the AMUX pin continues to output 0 V, and my 12‑bit ADC consistently reads a value of 0. I used one of the S32K3xx reference examples as the basis for my code, which I have attached, but the AMUX measurement is not functioning as expected. please, check this.

0 Kudos
Reply
1 Solution
852 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi, 

Your read-back confirms the AMUX is configured correctly, but the device is stuck in the INIT_FS.

To resolve this, please follow the initialization and watchdog sequence described in AN13850 (Secure file requiring an NDA), sections 6.1 and 6.2:

After power-up or reset, configure all required FS_I_xxx and FS_I_NOT_xxx registers as described in section 6.1.
Perform a good watchdog refresh within the 256ms INIT_FS window to close the initialization phase.
Once the safety outputs are released, the device will enter Normal mode and AMUX measurements should function as expected.

BRs, Tomas

View solution in original post

0 Kudos
Reply
4 Replies
876 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi,

Thank you for sharing the code and details. Could you please check the following:
- Read back M_AMUX_CTRL register after the write and confirm that AMUX_EN = 1 and AMUX[4:0] = 0x16 (BATSENSE selected). 
- Please also confirm that the SPI response indicates M_AVAL = 1, meaning the main state machine is in Normal mode.
- On the hardware side, please verify that the BATSENSE pin has the expected voltage present and that the AMUX pin is correctly routed to the ADC input.
 
BRs, Tomas
0 Kudos
Reply
856 Views
TTC_ZONE4
Contributor I
The M_AMUX_CTRL register was configured for M_AMUX_EN | M_AMUX_BATSENSE | M_AMUX_DIV_0 and verified via read-back as 0x56. This confirms the analog multiplexer is active and correctly routing the 12V BATSENSE input.
 
However, the SPI device status (u8DeviceStatus) reads back as 0xCA. Because the most significant bit is set (sbc_fs26_RxFrameType.u8DeviceStatus & 0x80 == 1), a global Fail-Safe fault is active. Additionally, the FS_STATES register returns 11, proving the device is stuck in the INIT_FS (Initialization Fail-Safe) state. 
0 Kudos
Reply
853 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi, 

Your read-back confirms the AMUX is configured correctly, but the device is stuck in the INIT_FS.

To resolve this, please follow the initialization and watchdog sequence described in AN13850 (Secure file requiring an NDA), sections 6.1 and 6.2:

After power-up or reset, configure all required FS_I_xxx and FS_I_NOT_xxx registers as described in section 6.1.
Perform a good watchdog refresh within the 256ms INIT_FS window to close the initialization phase.
Once the safety outputs are released, the device will enter Normal mode and AMUX measurements should function as expected.

BRs, Tomas

0 Kudos
Reply
749 Views
TTC_ZONE4
Contributor I
Thank you for your support.
My AMUX was not enabled properly, so it wasn’t routing the selected voltages to the AMUX pin. I appreciate the INIT sequence you provided — it solved the issue. I also configured the watchdog period to 256, and now the device remains in Normal state as expected.
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2384049%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EFS26%20Amux%20sensing%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2384049%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20am%20attempting%20to%20measure%20the%20voltage%20on%20the%20%3CSTRONG%3EAMUX%20pin%3C%2FSTRONG%3E%20after%20routing%20the%20%3CSTRONG%3EBAT%20sense%20voltage%3C%2FSTRONG%3E%20to%20it.%20I%20have%20verified%20all%20relevant%20register%20values%2C%20and%20the%20%3CSTRONG%3EFS_STATES%3C%2FSTRONG%3E%20register%20reports%20the%20device%20is%20in%20%3CEM%3ENormal%3C%2FEM%3E%20mode.%20However%2C%20the%20AMUX%20pin%20continues%20to%20output%200%E2%80%AFV%2C%20and%20my%2012%E2%80%91bit%20ADC%20consistently%20reads%20a%20value%20of%200.%20I%20used%20one%20of%20the%20%3CSTRONG%3ES32K3xx%20reference%20examples%3C%2FSTRONG%3E%20as%20the%20basis%20for%20my%20code%2C%20which%20I%20have%20attached%2C%20but%20the%20AMUX%20measurement%20is%20not%20functioning%20as%20expected.%20please%2C%20check%20this.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2384174%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20FS26%20Amux%20sensing%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2384174%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CDIV%3EThank%20you%20for%20sharing%20the%20code%20and%20details.%26nbsp%3B%3CSPAN%3ECould%20you%20please%20check%20the%20following%3A%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E-%20Read%20back%20M_AMUX_CTRL%20register%20after%20the%20write%20and%20confirm%20that%20AMUX_EN%20%3D%201%20and%20AMUX%5B4%3A0%5D%20%3D%200x16%20(BATSENSE%20selected).%26nbsp%3B%3CBR%20%2F%3E-%20Please%20also%20confirm%20that%20the%20SPI%20response%20indicates%20M_AVAL%20%3D%201%2C%20meaning%20the%20main%20state%20machine%20is%20in%20Normal%20mode.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E-%20On%20the%20hardware%20side%2C%20please%20verify%20that%20the%20BATSENSE%20pin%20has%20the%20expected%20voltage%20present%20and%20that%20the%20AMUX%20pin%20is%20correctly%20routed%20to%20the%20ADC%20input.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3EBRs%2C%20Tomas%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2385043%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20FS26%20Amux%20sensing%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2385043%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYour%20read-back%20confirms%20the%20AMUX%20is%20configured%20correctly%2C%20but%20the%20device%20is%20stuck%20in%20the%20INIT_FS.%3C%2FP%3E%0A%3CP%3ETo%20resolve%20this%2C%20please%20follow%20the%20initialization%20and%20watchdog%20sequence%20described%20in%20%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fwebapp%2Fsd%2Fcollateral%2F1766081088336714684758%3Fversion%3D4.0%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EAN13850%3C%2FA%3E%26nbsp%3B(Secure%20file%20requiring%20an%20NDA)%2C%20sections%206.1%20and%206.2%3A%3C%2FP%3E%0A%3CP%3EAfter%20power-up%20or%20reset%2C%20configure%20all%20required%20FS_I_xxx%20and%20FS_I_NOT_xxx%20registers%20as%20described%20in%20section%206.1.%3CBR%20%2F%3EPerform%20a%20good%20watchdog%20refresh%20within%20the%20256ms%20INIT_FS%20window%20to%20close%20the%20initialization%20phase.%3CBR%20%2F%3EOnce%20the%20safety%20outputs%20are%20released%2C%20the%20device%20will%20enter%20Normal%20mode%20and%20AMUX%20measurements%20should%20function%20as%20expected.%3C%2FP%3E%0A%3CP%3EBRs%2C%20Tomas%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2384896%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20FS26%20Amux%20sensing%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2384896%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CDIV%20class%3D%22%22%3EThe%20M_AMUX_CTRL%20register%20was%20configured%20for%20M_AMUX_EN%20%7C%20M_AMUX_BATSENSE%20%7C%20M_AMUX_DIV_0%20and%20verified%20via%20read-back%20as%200x56.%20This%20confirms%20the%20analog%20multiplexer%20is%20active%20and%20correctly%20routing%20the%2012V%20BATSENSE%20input.%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3EHowever%2C%20the%20SPI%20device%20status%20(u8DeviceStatus)%20reads%20back%20as%200xCA.%20Because%20the%20most%20significant%20bit%20is%20set%20(sbc_fs26_RxFrameType.u8DeviceStatus%20%26amp%3B%200x80%20%3D%3D%201)%2C%20a%20global%20Fail-Safe%20fault%20is%20active.%20Additionally%2C%20the%20FS_STATES%20register%20returns%2011%2C%20proving%20the%20device%20is%20stuck%20in%20the%20INIT_FS%20(Initialization%20Fail-Safe)%20state.%26nbsp%3B%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2386670%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20FS26%20Amux%20sensing%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2386670%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EThank%20you%20for%20your%20support.%3CBR%20%2F%3EMy%20AMUX%20was%20not%20enabled%20properly%2C%20so%20it%20wasn%E2%80%99t%20routing%20the%20selected%20voltages%20to%20the%20AMUX%20pin.%20I%20appreciate%20the%20INIT%20sequence%20you%20provided%20%E2%80%94%20it%20solved%20the%20issue.%20I%20also%20configured%20the%20watchdog%20period%20to%20256%2C%20and%20now%20the%20device%20remains%20in%20Normal%20state%20as%20expected.%3C%2FLINGO-BODY%3E