We are using NXP senseless BLDC code ( S32k344) for our custom design hardware where the PWMs are exactly the same as NXP eval board but the ADCs are different as follows:
Below is NXP ADCs :
Here is our ADC pins:
BEMF_A : PTE25 ( adc2_p7)
BEMF_B: PTE0 ( adc1_p2)
BEMF_C: PTA20 (adc2_p2)
DCB_V: PTD0 ( adc0_p1 )
DCB_I: PTE7 ( adc2_s20)
We have gone through the user guides for the sensorless firmware as well as the FOC like AN13767 but still having issues with the Bctu list items. Basically we need to know what the new Bctu list items wou;d be with the new ADCs mentioned above. Appreciate your URGENT support.
Hi@Eduardo2000
in the demo "MCSPTE1AK344_PMSM_FOC_2Sh_ll", the bctu list sample sequence is :
ADC0.P2(DCB_V)->ADC1.P1(BEMF_A)->ADC0.P1(DCB_I)->ADC1.P3(BEMF_B)
The above is only used for two ADC instances, which is ADC0 and ADC1
Since your hardware uses all ADC instances (ADC0, ADC1, ADC2), you can no longer refer to the sample project we provide (this will require a lot of changes)
So if possible, I suggest you modify the ADC port of your hardware to facilitate software configuration.
If you have any concerns please let me know.
Thanks for your response! We moved signals around to accommodate what you suggested! Now we are only using ADC0 and ADC2 as below:
BEMF_A : PTE25 ( ADC2_p7)
BEMF_B: PTB13 (ADC2_s8)
BEMF_C: PTA20 (ADC2_p2)
DCB_V: PTD0( ADC0_p1 )
DCB_I: PTD20 ( adc0_s22)
Highly appreciate your urgent support on this!
Please ignore my first reply. I misunderstood the demo you were referring to. I think the demo you were referring to was actually "MCSPTE1AK344_BLDC_6Step_sensorless_ll"
I have reconfigured BCTU according to the port you provided. You can refer to it to see if it works.
Not working ! Can you please walk me through how you configured the Bctu for different ADCs and came up with the table above ?
1.In the demo "MCSPTE1AK344_BLDC_6Step_sensorless_ll"
You can see the adc sample sequence is as below shows:
eMIOS0_CH3->ADC0_P0 DCB_I(SINGLE)
eMIOS0_CH2->ADC0_P1,ADC1_P1 DCB_V,BEMF_A(LIST)
eMIOS0_CH3->ADC0_P0 DCB_I(SINGLE)
eMIOS0_CH2->ADC0_P1,ADC1_P3 DCB_V,BEMF_B(LIST)
eMIOS0_CH3->ADC0_P0 DCB_I(SINGLE)
eMIOS0_CH2->ADC0_P1,ADC1_P2 DCB_V,BEMF_C(LIST)
2.According to your new ADC port changes.
A.For BCTU LIST->
B.For BCTU SINGLE
eMIOS0_CH3->ADC0_S22 DCB_I(SINGLE)
eMIOS0_CH2->ADC0_P1,ADC1_P7 DCB_V,BEMF_A(LIST)
eMIOS0_CH3->ADC0_S22 DCB_I(SINGLE)
eMIOS0_CH2->ADC0_P1,ADC1_S8 DCB_V,BEMF_B(LIST)
eMIOS0_CH3->ADC0_S22 DCB_I(SINGLE)
eMIOS0_CH2->ADC0_P1,ADC1_P2 DCB_V,BEMF_C(LIST)
Also, the ADC instance for the temperature sensor should be modified as well.
I don't have the hardware to test this for you, but I think I've explained it in enough detail.