cancel
Showing results for 
Search instead for 
Did you mean: 

Changing Over Current Protection Comparator threshold does not change the Standby 1 and 2 outputs accordingly in the code

PBela.1
Associate II

I'm currently trying to spin a motor using the STEVAL_SPIN3201 and the motor control workbench and when I add a small load I get the overcurrent fault. After some research in the source code I realised that the OCCOMP was indeed overcurrenting with the 100mV comparator threshold. I then tried to set the threshold to 500mV but when I generate the source code the OCTH_STBY2_Pin stays at GPIO_PIN_RESET and I still overcurrent. I tried changing manually in the source code the output for GPIO_PIN_SET and I don't overcurrent anymore but whenever I regenerate code from motor workbench this gets overwritten. Is there another setting in the motor workbench that prevents this threshold to change or is there a bug in the code generation?

0693W000000TglqQAC.png

0693W000000Tgm0QAC.png

0693W000000TglvQAC.png

Best regards,

1 ACCEPTED SOLUTION

Accepted Solutions
CLutz.1
Associate II

Hi,

I can not help on the issue, but I can confirm same situation on SPIN3202. OCTH_STBY1 is reset and OCTH_STBY2 is set. No effect by comperator threshold setting in MCWB. You can try to set OCTH_STBY1 and OCTH_STBY2 again after MX init in /* USER CODE BEGIN 0 */. This will not be overwritten by re-generation.

View solution in original post

3 REPLIES 3
PBela.1
Associate II

Bumping this questions up since I have not received an answer yet...

CLutz.1
Associate II

Hi,

I can not help on the issue, but I can confirm same situation on SPIN3202. OCTH_STBY1 is reset and OCTH_STBY2 is set. No effect by comperator threshold setting in MCWB. You can try to set OCTH_STBY1 and OCTH_STBY2 again after MX init in /* USER CODE BEGIN 0 */. This will not be overwritten by re-generation.

Thanks for the confirmation. This is indeed the workaround that I ended up doing.