cnoviello / mastering-stm32 Goto Github PK
View Code? Open in Web Editor NEWRepository of all examples presented in the "Mastering STM32" book
License: GNU General Public License v3.0
Repository of all examples presented in the "Mastering STM32" book
License: GNU General Public License v3.0
for instance, in nucleo-f411RE/src/ch14/main-ex1.c:
data = (uint8_t*)malloc(sizeof(uint8_t)*(len+2));
// ...
/* We are now ready to transfer the buffer over the I2C bus */
returnValue = HAL_I2C_Master_Transmit(hi2c, DevAddress, data, len + 2, HAL_MAX_DELAY);
if(returnValue != HAL_OK)
return returnValue; // <--- !!! you forgot to call free() here
free(data);
Ubuntu 20.04, I am having problem with displaying the welcome message in terminal after launching kermit. After launching kermit, I open the terminal with the settings provided but cannot see the welcome messages when i run the program.
Is there something am i missing ? I have tried minicom as well but had the same problem. I cannot type in the terminal as well.
Hi CN,
I have been trying to get the bootloader example working on a f401re, from the ebook (paid) in System Workbench.
I am unable to get the linking side working as by default System Workbench uses one .ld file. Your example uses 2 (one for the bootloader and one for the application)
Do you have a project for this? Or can you help?
Cheers
Boondoggler
Hi,
I've just tried your custom booloader example on a nucleo l073RZ with system workbench and
it always fails with a HardFault:
0xfffffffe
() at 0xfffffff9
__register_exitproc() at 0x8003862
atexit() at 0x800380a
_start() at 0x8000146
I guess it has something to do with the linker script. Do you have a working project available for this board?
Best regards,
Constantin
Hi,
I would be grateful if you could provide an example of setting up FreeRTOS for STM32F405 custom (not nucleo) board. I got a bit stucked with some errors, I guess I have to start again.
Nice book!
Mateusz
https://github.com/cnoviello/mastering-stm32/blob/master/nucleo-f446RE/Middlewares/FatFs/src/drivers/sd_diskio_spi.c#L354
ACMD41 returns 0x05 (includes the illegal command flag) here
I think this line
https://github.com/cnoviello/mastering-stm32/blob/master/nucleo-f446RE/Middlewares/FatFs/src/drivers/sd_diskio_spi.c#L259
should have been
cmd_message[0] = cmd | 0x40;
I'm using a SanDisk 64 GB microSDXC card, and after making the above correction, ACMD41 returns 0x00 and the SD card initialization process is successful
This bug is in "..\mastering-stm32\nucleo-f072RB\src\ch8
I used the second way: main-ex2.c
edit: in main-ex3.c the bug is not present. I think the ringbuffer killed it.
I want to know. Why it hangs?
Hi C
The bootloader example only seems to run in debug mode (using System Workbench) and works fine jumping to the application.
It doesn't work non-debug mode, I can't see why the debugger would make a difference to the code running.
Any ideas?
Cheers
There's an issue with the DMA in polling mode example. When configuring the DMA you have not selected the channel (it seems like it's just omitted) causing the DMA initalisation not to work. The way I fixed it is by adding:
hdma_usart2_tx.Init.Channel = DMA_CHANNEL_4;
Thanks for the amazing book and please let me know if I've made a mistake here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.