Reputation: 11
I would like to use QCA7000 with STM32. Is there any examples of using QCA with STM32 via SPI? Officially there is only driver for Linux on i.mx 28 from Qualcomm.
Finally, I would like to use it with freertos plus lwip or freertos TCP.
Upvotes: 1
Views: 1645
Reputation: 100
You can write your own SPI read and write functions using HAL libraries. As @Kons mentioned before there is no specific driver exits, but also, implementation is not a hard task.
HAL_GPIO_WritePin(YOUR_SPI_GPIO_REV,YOUR_SPI_GPIO_NUMBER, GPIO_PIN_RESET);
HAL_SPI_Transmit(hspi1, tx_data, data_size, HAL_MAX_DELAY);
HAL_GPIO_WritePin(YOUR_SPI_GPIO_REV,YOUR_SPI_GPIO_NUMBER, GPIO_PIN_SET);
The most important thing is, you need to transmit data before receive it. (SPI working principle) If you're not sure what to send, you can read the datasheet.
HAL_GPIO_WritePin(YOUR_SPI_GPIO_REV,YOUR_SPI_GPIO_NUMBER, GPIO_PIN_RESET);
HAL_SPI_Transmit(hspi1, frame, data_size, HAL_MAX_DELAY);
HAL_SPI_Receive(hspi1, rx_data, data_size, HAL_MAX_DELAY);
HAL_GPIO_WritePin(YOUR_SPI_GPIO_REV,YOUR_SPI_GPIO_NUMBER, GPIO_PIN_SET);
Upvotes: 0
Reputation: 94
there is no such driver. You can implement yourself one by following the open-to-public documentations, like https://in-tech-smartcharging.com/assets/Downloads/an4_rev5.pdf
There was a better one but i'm not able to find it. I'll update if it comes up.
(I implemented multiple versions but they are all close sourced to the company where i work)
Upvotes: 0