peripherals in cores

turboscrew
Sun Dec 24, 2017 8:54 am
Where can I find out the devices and GPIO-pins used by the cores?
I’m using blue pill, and I’d like to know what resources does Serial.Println() use. Does it use DMA as FIFO?
Also on my blue pill SPI1 NSS doesn’t work – it doesn’t go high when the SPI is disabled – well, it does, but a lot later, so the default NSS-pin can’t be used at all. (Haven’t tried the other SPIs.)

stevestrong
Sun Dec 24, 2017 10:17 am
Arduino_STM32 core
Serial is mapped to USB serial interface, if you have enabled -DSERIAL_USB in the boards.txt.
Otherwise serial is mapped to USART 1 interface, which uses PA9/10.
None of the serial interfaces uses DMA.

The NSS pin has to be controlled by the user:
#define NSS_PIN PA4 // you can use any other available pin
...
pinMode(NSS_PIN, OUTPUT);
digitalWrite(NSS_PIN, HIGH); // deactivate slave select
...


turboscrew
Sun Dec 24, 2017 10:49 am
My “problem” is more like trying to get RFM69 library to work, and that includes having the right wires to right pins.
There are also serial prints, that I’d wish to get to my development computer terminal.

I’d also just like to know where to find the definitions, if I use some other libraries in the future, so my question is kind of generic.

Also, if there is:
genericSTM32F103C.menu.upload_method.STLinkMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER



turboscrew
Sun Dec 24, 2017 11:20 am
Thanks! That helps.

stevestrong
Sun Dec 24, 2017 11:30 am
[turboscrew – Sun Dec 24, 2017 10:49 am] –
genericSTM32F103C.menu.upload_method.STLinkMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER

turboscrew
Sun Dec 24, 2017 11:34 am
Went a bit further and found this: https://github.com/rogerclarkmelbourne/ … rd/board.h
This seems to go a long way. It also suggests, that SysTick is used as a “main clock”.

turboscrew
Sun Dec 24, 2017 11:36 am
[stevestrong – Sun Dec 24, 2017 11:30 am] –

[turboscrew – Sun Dec 24, 2017 10:49 am] –
genericSTM32F103C.menu.upload_method.STLinkMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER

stevestrong
Sun Dec 24, 2017 11:40 am
[turboscrew – Sun Dec 24, 2017 11:36 am] –
I wonder if you can have serial output while debugging via ST-LINK…?

No, see here: viewtopic.php?f=35&t=3018


turboscrew
Sun Dec 24, 2017 11:54 am
I was wondering if ST-LINK was kept as a debug interface and USART1 could easily been configured as ‘Serial’…

Uh, I guess I just need to remove the “USB_SERIAL” and use, say, Eclipse/OpenOCD for uploading and debugging via ST-LINK?


stevestrong
Sun Dec 24, 2017 12:33 pm
Yes.

turboscrew
Sun Dec 24, 2017 12:38 pm
Thanks, stevestrong!

Leave a Reply

Your email address will not be published. Required fields are marked *