Having two writes to clean and set COUNTn_RX and NUM_BLOCK results in
a small windows in which COUNTn_RX and NUM_BLOCK are zero.
This results in a stall as the buffer is empty (ready to receive) but
also has no space to receive the package into.
Signed-off-by: Jonas Martin <j.martin@pengutronix.de>
Add the STM32G0 to the CMake setup. This CMake is specific to the STM32G0B1xK device. Also included the linker file that is required for the make.
Currently G0 targets are disabled by default to keep project buildable
as-is.
Add the STM32 library files to support the STM32G0 products. The chipset files included support the STM32G0B1xK which supports 1 Full Speed USB and 2 CANFD channels.
This also includes a version bump for some of the common files (CMSIS,
etc)
Also remove some useless math/DSP headers.
The USB code really needed updating, considering the following entries from ST's
release notes (
https://raw.github.com/STMicroelectronics/STM32CubeF0/master/Release_Notes.html
) :
-Bug fix: USB_ReadPMA() and USB_WritePMA() by ensuring 16-bits access to
USB PMA memory
-Bug fix: correct USB RX count calculation
-Fix USB Bulk transfer double buffer mode
The project uses tabs with a length of 4 spaces, and spaces for
continuation, so lets use that for the whole project. There are
many trailing whitespaces and empty lines here and there; get
rid of them as well.
Some files have Windows line endings which is annoying, since pathes
won't apply, diffs looks ugly etc. So do convert the few files which
have Windows line endings to use Unix line endings as well.