Giter Site home page Giter Site logo

cnoviello / mastering-stm32 Goto Github PK

View Code? Open in Web Editor NEW
408.0 408.0 151.0 15.16 MB

Repository of all examples presented in the "Mastering STM32" book

License: GNU General Public License v3.0

C 96.32% C++ 1.63% Assembly 0.08% Python 0.04% Makefile 0.01% Objective-C 0.02% CSS 0.01% HTML 0.06% JavaScript 1.82%

mastering-stm32's People

Contributors

cnoviello avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mastering-stm32's Issues

There is a memory leak in Write_To_24LCxx

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);

CHAPTER 8, having problem with kermit and eclipse terminal

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.

System workbench project

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

Custom bootloader example is not running

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

STM32F405 board example ?

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

SD card initialization example: ACMD41 transmission bit missing

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

Bootloader example only runs in debug mode

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

CHAPTER9_EXAMPLE1_ISSUE

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.