Search found 144 matches

by danieleff
Fri Apr 28, 2017 11:19 am
Forum: Cores
Topic: STM32GENERIC, my arduino implementation
Replies: 106
Views: 1193

Re: STM32GENERIC, my arduino implementation

Then I will change the menu on discovery407 to UART2 and somehow #undefine UART1 @zmemw16 I do not have all the boards, and time to go through every schematic. Currently all UARTs should be usable, on defaulted to the primary pin (the same CubeMX gives first if you enable). You can set alternate pin...
by danieleff
Fri Apr 28, 2017 4:57 am
Forum: Cores
Topic: STM32GENERIC, my arduino implementation
Replies: 106
Views: 1193

Re: STM32GENERIC, my arduino implementation

Seems like on discovery the PA9 (uart1 transmit) is connected to vbus? (UM1472 page 35) Here is the basic low level code for sending on UART2, PA2/PA3, just generated with CubeMX, if for some the SerialUARx does not work, could you try this: void setup() { __HAL_RCC_USART2_CLK_ENABLE(); __HAL_RCC_GP...
by danieleff
Thu Apr 27, 2017 5:37 pm
Forum: Cores
Topic: STM32GENERIC, my arduino implementation
Replies: 106
Views: 1193

Re: STM32GENERIC, my arduino implementation

So UART seems to not work for some? It should be either: A) select SerialUART in menu, then write Serial.begin(...); Serial.print(...) or B) Use SerialUARTx.begin(...); SerialUARTx.print(...) Could you try all SerialUART1, SerialUART2...? @michael_l: Currently if you #include "STM32_HAL.h"...
by danieleff
Thu Apr 27, 2017 3:20 pm
Forum: CubeMX and HAL
Topic: [STM32GENERIC] micros() bug??
Replies: 18
Views: 171

Re: [STM32GENERIC] micros() bug??

Libmaple also does this "check if millis changed" https://github.com/rogerclarkmelbourne/ ... time.h#L56

I will use your implementation if no better is found.
by danieleff
Thu Apr 27, 2017 12:52 pm
Forum: CubeMX and HAL
Topic: [STM32GENERIC] I2C Examples
Replies: 6
Views: 56

Re: [STM32GENERIC] I2C Examples

I2C Scanner code is the discovery scanner with their specific I2S stuff etc commented out i have a tmp102 and a 128x64 0.98 I2C oled SSD1306, with 4k7 pullups and 3v3 plugged in this is SERIALINTERFACE #defined as SerialUSB ... 0 Unknown error at address 0x3B 0 I2C device found at address 0x3C ! 0 ...
by danieleff
Wed Apr 26, 2017 7:00 pm
Forum: CubeMX and HAL
Topic: [STM32GENERIC] I2S implementation
Replies: 2
Views: 55

[STM32GENERIC] I2S implementation

The current implementation is in https://github.com/danieleff/STM32GENERIC/blob/master/STM32/libraries/I2S/src/I2S.cpp (not much...) The write() currently sends unsigned 16 bit data. I do now know what the official implementation for SAMD21 boards expects to send (signed/unsigned/what type of buffer...
by danieleff
Wed Apr 26, 2017 6:36 pm
Forum: CubeMX and HAL
Topic: [STM32GENERIC] micros() bug??
Replies: 18
Views: 171

Re: micros() bug??

I belive SysTick->VAL is counting down from SysTick->LOAD to 0.
So if you use `return (HAL_GetTick()*1000) + (SysTick->VAL / (SystemCoreClock / 1000000));`
and print

Code: Select all

Serial.println(micros());
Serial.println(micros());
delay(3000);

you will go back in time like Marty McFly
by danieleff
Wed Apr 26, 2017 5:54 pm
Forum: CubeMX and HAL
Topic: [STM32GENERIC] Adding new boards, issues with existing board variants
Replies: 1
Views: 41

[STM32GENERIC] Adding new boards, issues with existing board variants

Requests for specific boards can come here. A little description is here on how to try to create one: https://danieleff.github.io/STM32GENERIC/add_board/ @zmemw16 added the F407ZE and F407ZG boards. Because they are so similar, I added an a submenu for Black STM32F407. I do not have them, so don't k...
by danieleff
Wed Apr 26, 2017 4:33 pm
Forum: Cores
Topic: STM32GENERIC, my arduino implementation
Replies: 106
Views: 1193

Re: STM32GENERIC, my arduino implementation

Yes please create a new thread in viewforum.php?f=46 for a topic, as the discussions are getting mixed up now.
by danieleff
Wed Apr 26, 2017 7:29 am
Forum: Cores
Topic: STM32GENERIC, my arduino implementation
Replies: 106
Views: 1193

Re: STM32GENERIC, my arduino implementation

I added yesterday an I2S, HOWEVER I do not have hardware for that so no way to try. For now, something like: #include "I2S.h" I2SClass i2s(SPI3, PC12 /*sd*/ , PA4 /*ws*/, PC10 /*ck*/); // check board schematic ... i2s.begin(I2S_PHILIPS_MODE, 44000, 16); i2s.write(data); Again, absolutely u...

Go to advanced search