How to init SPI properly
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-07-21 8:00 AM - edited 2023-11-20 8:18 AM
Hi,
I am trying to init SPI1 (to just receive data qwith MISO) on nucleo G474RE without using HAL libraries.
Can you help me to assess why my code does not work ?
I can't see the clock eventhough SPI1 is enabled
void SPI1_init(){
RCC-> APB2ENR|=(1 AHB2ENR |= (1MODER &= ~(1 AFR[0] |= (1 AFR[0] |= (1 AFR[0] |= (1 CR1 |= (1 CR1 |= (1 CR1 |= (1 CR2 |=(1CR2 |= (1CR1|= (1CR1|= (1CR1&= ~(1
Solved! Go to Solution.
Labels:
- Labels:
-
SPI
-
STM32G4 Series
20 REPLIES 20
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-07-25 3:12 AM
@Tommino "How is this prevented?"
There'll be a status bit that tells you when a transfer has completed.
On this chip, you also have read & write FIFOs
A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
A complex system designed from scratch never works and cannot be patched up to make it work.

- « Previous
- Next »