Piezo Pusher is in receive-only slave mode. For detailed information on the message protocol, please refer to the piezoAPI.
On NUCELO dev board:
MOSI: D11 (PB5)
NSS: D10 (PA11)
CLK: D13 (PB3)
To download STM32CubeIDE, go to the following link and install version 1.16.1 for your operating system: https://www.st.com/en/development-tools/stm32cubeide.html
Before you can clone the repository, I will need your GitHub username to give you authorization to make changes. Regardless, you will need to set up SSH on your Github account. This takes at most two steps:
-
If you don't have any existing keys, you will need to generate a pair (https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)
-
Add the SSH public key to your GitHub account (https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account)
NOTE: When you launch STM32CubeIDE, it will ask what directory to open from. Make sure you clone the repository into the workspace directory!

To clone the repo, you need its URL. Navigate to the "Code" block and select the SSH URL and copy it to your clipboard.
If on Windows, I recommend using the Git CLI. You can download it here: https://git-scm.com/downloads
Open the Git CLI, and use the cd command to set your PWD to the workspace directory that the STM32CubeIDE on your machine uses (see image above).
For example, I would type into the terminal cd /Users/admin/STM32CubeIDE/workspace_1.16.1
Once in the directory, you can now clone the repository with the clone command! Type into your Git CLI: git clone git@github.com:fleuryfrye/pushingPower.git
To confirm it worked properly, type in ls into your Git CLI and confirm "pushingPower" shows up. If it does, you can open the STM32CubeIDE and you will now be able to open the codebase.
For simplicity, I've provided a HAL in `piezo.h/c`. If you're interested in how it works, you can dive into the abstraction layers, but you can just call the functions I've provided and trust that it works. For the signal modulation logic, ALL of the functions needed will be provided in piezo.h/c! Think of it as a libary.
I recommend putting all the logic for the signal modulation into `signal.h/c` to follow the existing structure of files, and including `piezo.h`. todo STM32 Reference Manual: Download STM32F3 Reference Manual
STM32 ADC Information Document: Download STM32 ADC Info (PDF)