My hardware is:
- FRDM-A-S32M276-C064
- Faulhaber 3216 BXTH BLDC 12V
- Encoder is IEF3 with 128L
I have connected it as shown in the starting guide
https://www.nxp.com/document/guide/getting-started-with-frdm-a-s32m276-development-board-setup-and-p...
I have connected the encoder directly to the pins corresponding to the enconder and I dropped (Anegated, Bnegated, Inegated). In the provided code from the application hub I've set ENCODER 1, which runs the following (in the setup part):
Siul2_Port_Ip_SetInputBuffer(NULL_PTR, NULL_PTR, 1, 54, 3U);
//this effectively functions as:
//IP_SIUL2->IMCR[54] = SIUL2_IMCR_SSS(3U);
/* Assign eMIOS0_CH7 input to TRGMUX_OUT_38 */
Siul2_Port_Ip_SetInputBuffer(NULL_PTR, NULL_PTR, 1, 55, 4U);
Then
Lcu_Ip_SyncOutputValueType EncLcuEnable[6U];
EncLcuEnable[0].LogicOutputId = LCU_LOGIC_OUTPUT_8;
EncLcuEnable[0].Value = 1U;
EncLcuEnable[1].LogicOutputId = LCU_LOGIC_OUTPUT_9;
EncLcuEnable[1].Value = 1U;
EncLcuEnable[2].LogicOutputId = LCU_LOGIC_OUTPUT_10;
EncLcuEnable[2].Value = 1U;
EncLcuEnable[3].LogicOutputId = LCU_LOGIC_OUTPUT_11;
EncLcuEnable[3].Value = 1U;
Lcu_Ip_SetSyncOutputEnable(EncLcuEnable, 4U);
and finally
AEC_VDDE_Enable(1);
When I run this without the encoder connected, the application works correctly (sensorless). When I plug in the encoder and I rerun, it goes into fault immediately. Debugging I see the following:
alovi_0-1782330455130.png
which corresponds to an overcurrent event
#define AEC_AE_EVENTS_STATUS_OCD_VDDE_FL_MASK (0x8U)
#define AEC_AE_EVENTS_STATUS_OCD_VDDE_FL_SHIFT (3U)
How can I fix this problem? Any advice would be appreciated.