ArduinoCore-stm32wb icon indicating copy to clipboard operation
ArduinoCore-stm32wb copied to clipboard

STM32WB55 Nucleo, PDM library error 'SERIAL_STATUS_BUSY' was not declared in this scope

Open federica-ven opened this issue 1 year ago • 6 comments

Hi everyone, maybe it's just me but I'm trying to use this library to run the PDM example on a P-NUCLEO WB55 connected to to 2 PDM microphones but when I try to build the normal example I get these compilation errors:

_SerialUSB.ino:32:55: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'void (*)()' [-fpermissive] 
        Serial.write(&data[0], PDM_BUFFER_SIZE, status);

and also

 error: 'SERIAL_STATUS_BUSY' was not declared in this scope
         while (status == SERIAL_STATUS_BUSY)

am I doing something wrong?

Also, I can't seem to get the USB Serial device to show up, even for just a simple Serial.prinln(), I've worked with the official core from ST up until this moment so I might be a little new to this one, apologies for the questions.

federica-ven avatar Jan 23 '25 15:01 federica-ven

I think you will need to use the Arduino core in this repo in order to get any examples to work with it...Or comment out the offending lines, but then you won't have USB Serial...or use the official core and their PDM example...

In other words, these examples are not necessarily compatible with the official ST core. That is because the pin out is different, and we have written our own drivers for most of the serial peripherals including USB Serial, etc.

On Thu, Jan 23, 2025 at 7:16 AM Federica Ventriglia < @.***> wrote:

Hi everyone, maybe it's just me but I'm trying to use this library to run the PDM example on a P-NUCLEO WB55 connected to to 2 PDM microphones but when I try to build the normal example I get these compilation errors:

_SerialUSB.ino:32:55: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'void (*)()' [-fpermissive] Serial.write(&data[0], PDM_BUFFER_SIZE, status);

and also

error: 'SERIAL_STATUS_BUSY' was not declared in this scope while (status == SERIAL_STATUS_BUSY)

am I doing something wrong?

Also, I can't seem to get the USB Serial device to show up, even for just a simple Serial.prinln(), I've worked with the official core from ST up until this moment so I might be a little new to this one, apologies for the questions.

— Reply to this email directly, view it on GitHub https://github.com/GrumpyOldPizza/ArduinoCore-stm32wb/issues/14, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTDLKU6Y66XLPVMSVJJFH32MEBVNAVCNFSM6AAAAABVXTBBTKVHI2DSMVQWIX3LMV43ASLTON2WKOZSHAYDOMJXHEZTEMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

kriswiner avatar Jan 23 '25 16:01 kriswiner

Ah thank you for clarifying that. It makes sense! Although the official core doesn’t have a PDM library I believe, that’s why I was interested about this one. Do you think trying to implement your library for the official core would be difficult?

federica-ven avatar Jan 23 '25 23:01 federica-ven

"Do you think trying to implement your library for the official core would be difficult?"

Probably...why not just use the Arduino core and the Arduino IDE? I know this works...

On Thu, Jan 23, 2025 at 3:34 PM Federica Ventriglia < @.***> wrote:

Ah thank you for clarifying that. It makes sense! Although the official core doesn’t have a PDM library I believe, that’s why I was interested about this one. Do you think trying to implement your library for the official core would be difficult?

— Reply to this email directly, view it on GitHub https://github.com/GrumpyOldPizza/ArduinoCore-stm32wb/issues/14#issuecomment-2611226320, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTDLKVYKWCNR7JI2H6PTQT2MF36VAVCNFSM6AAAAABVXTBBTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJRGIZDMMZSGA . You are receiving this because you commented.Message ID: @.***>

kriswiner avatar Jan 23 '25 23:01 kriswiner

I have a STM32 core unfortunately

federica-ven avatar Jan 24 '25 11:01 federica-ven

??

This https://github.com/GrumpyOldPizza/ArduinoCore-stm32wb is an excellent STM32WB5X Arduino core.

There is also an STM32WB55 dev board https://www.tindie.com/products/tleracorp/firefly-ble-stm32wb55-development-board/ (Firefly) and an STM32WB5MMG dev board https://www.tindie.com/products/tleracorp/sasquatch-stm32wb5mmg-development-board/ (Sasquatch) available. Not sure if we have put the core for the latter on github yet though...

Either of these would allow use of a PDM mic.

On Fri, Jan 24, 2025 at 3:57 AM Federica Ventriglia < @.***> wrote:

I have a STM32 core unfortunately

— Reply to this email directly, view it on GitHub https://github.com/GrumpyOldPizza/ArduinoCore-stm32wb/issues/14#issuecomment-2612354654, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTDLKUBBADM2BO3XXI55UT2MITEHAVCNFSM6AAAAABVXTBBTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJSGM2TINRVGQ . You are receiving this because you commented.Message ID: @.***>

kriswiner avatar Jan 24 '25 16:01 kriswiner

There is more to PDM internally than meets the eye. STM32Duino just does not have the infrastructure to make that remotely feasible. But feel free to give it a go. After all the source code is available.

Yes, I need to update the GitHub for the newer boards, and yes I should add USB Audio ...

GrumpyOldPizza avatar Feb 06 '25 12:02 GrumpyOldPizza