Search found 24 matches

by mrguen
Tue May 11, 2021 7:46 pm
Forum: General discussion
Topic: SPI working on STM32F401, not on STM32F405
Replies: 17
Views: 7431

Re: SPI working on STM32F401, not on STM32F405

@Bakisha Seems strange as PYn is the pin number while PY_n is the PinName all standard Arduino API uses pin number. Some few extra API use directly PinName. it works for @mrguen as it uses the SPI.setXXX which handles both notations. Well if you consider that "PA_10" might be different th...
by mrguen
Tue May 11, 2021 4:53 pm
Forum: General discussion
Topic: SPI working on STM32F401, not on STM32F405
Replies: 17
Views: 7431

Re: SPI working on STM32F401, not on STM32F405

Frankly, I was far from the theory. I wanted to be coherent and use the #define in the Pin configuration table. Using the pin number was throwing a compilation error so I changed everything to pin names.
by mrguen
Tue May 11, 2021 2:34 pm
Forum: General discussion
Topic: SPI working on STM32F401, not on STM32F405
Replies: 17
Views: 7431

Re: SPI working on STM32F401, not on STM32F405

I finally got it working, after adding some Serial.println lines... so I suppose "things were going too fast !!!" :evil: Indeed the graphic test is extremely fast. Here is the full code: #include <Adafruit_GFX.h> // Core graphics library #include <Adafruit_ST7735.h> // Hardware-specific li...
by mrguen
Tue May 11, 2021 2:21 pm
Forum: General discussion
Topic: SPI working on STM32F401, not on STM32F405
Replies: 17
Views: 7431

Re: SPI working on STM32F401, not on STM32F405

Also I noticed that the microcontroller is not going out of the bootloader mode after downloading. I have to change BOOT0 from 1 to 0 and reset to enumerat the COM port and run the program (different from generic STM32F401RG)
by mrguen
Tue May 11, 2021 2:08 pm
Forum: General discussion
Topic: SPI working on STM32F401, not on STM32F405
Replies: 17
Views: 7431

Re: SPI working on STM32F401, not on STM32F405

@Bakisha I did not define anything more than the needed pins. I don't think it hurts. It was working like that on the STM32F401.
by mrguen
Tue May 11, 2021 1:06 pm
Forum: General discussion
Topic: SPI working on STM32F401, not on STM32F405
Replies: 17
Views: 7431

Re: SPI working on STM32F401, not on STM32F405

Yes, I added build_opt.h with -DHSE_VALUE=16000000
by mrguen
Tue May 11, 2021 12:21 pm
Forum: General discussion
Topic: SPI working on STM32F401, not on STM32F405
Replies: 17
Views: 7431

Re: SPI working on STM32F401, not on STM32F405

I use an external 16 MHz crystal. 16 / 8 * 168 / 2 = 168 MHz. The mcu is working and I can have a program run the Sketch also uses Serial that is displaying on the Serial Monitor. Here is the clock config that I use in the sketch: extern "C" void SystemClock_Config(void) { RCC_OscInitTypeD...
by mrguen
Mon May 10, 2021 6:25 pm
Forum: General discussion
Topic: SPI partly working when using hardware, library or code CS management
Replies: 11
Views: 7874

Re: SPI partly working when using hardware, library or code CS management

@jjar88 I did not make a library, only testing a sketch with the code I provided. I am sorry it was some months ago and I was not into this until today. Now I have moved to STM32F405. Since these microcontrollers are very similar I thouht it would work without any change. But I spent my all day tryi...
by mrguen
Mon May 10, 2021 6:23 pm
Forum: General discussion
Topic: SPI working on STM32F401, not on STM32F405
Replies: 17
Views: 7431

SPI working on STM32F401, not on STM32F405

Hello, I am working on an application that uses SPI=SPI1 with alternate pins (MOSI=PB5, MISO not used, SCK=PB3) to communicate with a TFT screen and another SPI (SPI2) to communicate with an ADC. I tested ok with STM32F401. I thought it would run the same on STM32F405. Unfortunately I was not able t...
by mrguen
Mon May 10, 2021 9:02 am
Forum: General discussion
Topic: Question about PB_10 configuration on STM32F405RG probably related to USB_OTG_HS
Replies: 4
Views: 1889

Re: Question about PB_10 configuration on STM32F405RG probably related to USB_OTG_HS

Hello

What do you mean by
the "issue" you mentioned is a PR which is not merged as it request review.


How can I have this pin work normally?

Go to advanced search