2020-03-11 08:31 AM
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?
Best regards,
Solved! Go to Solution.
2020-05-04 04:15 AM
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.
2020-04-29 11:30 AM
Bumping this questions up since I have not received an answer yet...
2020-05-04 04:15 AM
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.
2020-05-04 06:04 AM
Thanks for the confirmation. This is indeed the workaround that I ended up doing.