-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] BLDCDriver6PWM issue with STM Nucleo #364
Comments
Hi, You should add a title to the issue. |
Sorry for the mistake; I've added a title. |
How are you defining the board in platformio.ini? |
This is what I have so far |
It's |
Oups 😂 |
Tried it with the underscore, didn't change anything. |
The However there may be further issues with the 6PWM configuration you're using. Please also add the following build flag to platformio.ini:
And the following code to the start of your setup:
Please let us know the output produced by the init functions. |
Hi,
Hi, I've been trying to do what you said, but I have a different problem now. Nothing I write via Serial or SerialUSB is visible on the serial monitor. I've tried googling the problem and I've enabled some of the flags, but still no success.
My ini file looks now like this:
|
If it's a Nucleo64 board then I think it does not have USB serial. The USB is connected to the on-board ST-Link. The ST-Link has a virtual com port feature, and normally this is connected to USART2 of the STM32s. So you can use it by using the standard "Serial" object and the build-flag:
You have to remove the USB-Serial related build-flags. |
Thanks, that was the solution! For others that might have the same problem, this was the platformio.ini code I've used:
|
I think the problem is related to this issue: #220
I've selected pins so none of them uses the N channel and they are all on different timers, but I still get a negative score:
How is the score calculated? |
It's a fairly complicated question, but basically the more different timers are used, the worse (higher) the score. And a negative score always means some kind of error, the configuration can't be made to work. -7 means: the high and low low side of one or more phases are not on the same timer. When using 6-PWM, it is best to use all the pins from TIM1 or TIM8, using the inverted channels for the low side. If you can't do this, the next-best option is to use pins where high and low side are always on the same timer. |
Thank you, that was the solution. For each pair of high and low pins I used the same timer and channel (but with the N sufiix for the low one) and that worked. |
Bug description
When I am using the BLDCDriver6PWM function, I get nothing on my PWM output pins, while when I am using the BLDCDriver3PWM function, I get the desired results. It seems that the compiler is using the _writeDutyCycle6PWM function from generic_mcu.cpp instead of the hardware-specific variants. The generic version of the _writeDutyCycle6PWM function seems not to be properly defined.
Hardware
I am using a STM32 Nucleo F303RE board.
IDE
The text was updated successfully, but these errors were encountered: