Forum Replies Created
-
AuthorPosts
-
Carmine NovielloKeymaster
Hi,
You are right: the template for the STM32F091 MCU is missed. In this phase, you can safely use the template for the STM32F030: the example will work the same.However, take in account that the vector tables for the two MCUs differ, so if you are going to do something more advanced with your board, then you need to pick the right vector table for your Nucleo. However, the hello nucleo example will work.
Regards,
CarmineCarmine NovielloKeymasterEccomi.
Hai ragione, il codice nel libro è sbagliato!!! Fai riferimento agli esempi del libro per il codice corretto (https://github.com/cnoviello/mastering-stm32/blob/master/nucleo-f401RE/src/ch7/main-ex3.c).
In pratica, è sbagliato alla line 83: non è il 4 ma il 2!
Carmine NovielloKeymasterCiao Davide,
ho scelto il PB2 nell’esercizio perché se vedi è adiacente a un pin connesso alla GND, quindi ti basta un qualcosa che faccia da corto (puoi anche usare un jumper con spaziatura da 2.54mm).Carmine
Carmine NovielloKeymasterHi Francisco,
Thank you for your feedback.May I know which El Capitan version are you using (10.11.?)? Other readers reported me issues with OSX EL Capitan, while it seems to work well in your case. As far as I know, El Capitan has an issue with the libusb library, which should be fixed with 10.11.4 release.
Carmine
Carmine NovielloKeymasterHi,
It seems that there is a patch for this issue, that I’ve never seen before on OSX :-O Which OSX version are you using?However, from the openocd folder, run this command at the terminal prompt:
12wget http://openocd.zylin.com/changes/2838/revisions/169db31ae06627a073c8179dc33d1bce1e88f4d6/patch\?zip -O 169db31.diff.zip; unzip 169db31.diff.zip; patch -u src/flash/nor/sim3x.c 169db31a.diffLet me know if it solves.
Carmine
Carmine NovielloKeymasterProbably you are working on an STM32F1xx MCU. GPIOs in STM32F1 MCUs can’t be easily remapped to other features, since the remapping feature is really limited. A pin can essentially have two modes: output/input push pull and alternate function push pull. When you want to use a GPIO as signal I/O of a given peripheral, then you first define the GPIO as alternate function push pull and then enable the peripheral. The binding peripheral=GPIOs is hardwired. Only few peripherals (for example the USART3 in an STM32F103 MCU) can assign I/Os to different GPIOs by performing a sort of “software remap”. Take a look at the stm32f1xx_hal_gpio_ex.h module.
That’s essentially is the reason why that field is omitted in CubeF1 HAL.
Carmine NovielloKeymasterIf you are using the toolchain described in my book, the only alternative is to import the projects by hand. With a little bit of experience it’s not so difficult.
Otherwise, you may consider to download and install also the AC6 toolchain to work with ST examples.
Carmine NovielloKeymasterHi Louis,
Yes you are right. The the right time is T2. I’ll fix it in the next release. Really thanks to let me know this.Regards,
CarmineCarmine NovielloKeymasterNo, unfortunately you can’t import a SW4STM32 project directly inside an Eclipse IDE with the GNU ARM Eclipse plugins. You need the AC6 toolchain.
Carmine NovielloKeymasterHi,
Glad to listen that my book is useful for you 😉About your question. Are you importing the project using the CubeMXImporter tool or by hand? Take in account that actually CubeMXImporter isn’t able to import projects shipped with the CubeHALs. You have to import them manually.
If you place the project somewhere (dropbox, etc) I can try to give it a look to understand the problem. It’s hard to say what’s going wrong.
Regards,
CarmineCarmine NovielloKeymasterGuarda la Figura 17 del capitolo 4 (circa pg. 128). È la stessa procedura descritta lì, cambia solo la macro. Assicurati che non ci sia la macro OS_USE_TRACE_SEMIHOSTING_DEBUG.
Carmine NovielloKeymasterCiao, no la macro va definita a livello di progetto, altrimenti non è attiva nel file _syscalls.c, dove avviene la compilazione effettiva delle funzioni C di basso livello.
Carmine NovielloKeymasterCiao,
nell’ordine verifica che:- Stai usando la macro OS_USE_SEMIHOSTING invece di OS_USE_TRACE_SEMIHOSTING_DEBUG.
- Hai levato la spunta alla voce Assume freestanding environment (-ffreestanding), nelle impostazioni di progetto.
- Nella configurazione di debug di OpenOCD, è attiva la spunta Enable ARM Semihosting nella sezione “Startup”.
Fammi sapere.
Carmine NovielloKeymasterIt seems that Eclipse can’t find the GCC toolchain. Ensure that its path is properly configured in the project settings. Refer to page 429 of the latest release of the book for more about this.
- This reply was modified 8 years, 8 months ago by Carmine Noviello.
Carmine NovielloKeymasterOttimo. Grazie a te.
-
AuthorPosts