STM32F401 SPI2 and SPI1 at the same time #1626
Replies: 9 comments 3 replies
-
Can you also try to use SPI1 only ? does it work ?
Point is not to check whether SPI device is well working but especially if it works with STM32. |
Beta Was this translation helpful? Give feedback.
-
Hi Alexander. |
Beta Was this translation helpful? Give feedback.
-
Hi Mr. Bourdiol
When I only use SPI1, it OK .
The problem is to use SPI1 and SPI2 at the same time.
Thanks a lot, best regards
fernando
Enviado do Outlook<http://aka.ms/weboutlook>
…________________________________
De: Alexandre Bourdiol ***@***.***>
Enviado: segunda-feira, 24 de janeiro de 2022 05:53
Para: stm32duino/Arduino_Core_STM32 ***@***.***>
Cc: fpgiovanini ***@***.***>; Mention ***@***.***>
Assunto: Re: [stm32duino/Arduino_Core_STM32] STM32F401 SPI2 and SPI1 at the same time (Discussion #1626)
Hi @fpgiovanini<https://github.com/fpgiovanini>, any news about SPI1 only tests ?
Can you also try to use SPI1 only ? does it work ?
—
Reply to this email directly, view it on GitHub<#1626 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALS7Q7SWVIRFC2ZQVX6BXP3UXUHPJANCNFSM5METBLAA>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi @fpgiovanini, So I guess there is something wrong, either in your hardware or in your software. |
Beta Was this translation helpful? Give feedback.
-
STM32F401_SPI.pdf |
Beta Was this translation helpful? Give feedback.
-
Hi Alexandre |
Beta Was this translation helpful? Give feedback.
-
Hi @fpgiovanini ,
|
Beta Was this translation helpful? Give feedback.
-
Hi Alexandre. there are 3 Chip Select defined for 2 SPI / 2 devices: I don't catch why you poll on MOSI signal ( while(digitalRead(LTC2400_SDO){}) ) A:A High state means the device is currently I don't think that SPI_CONTINUE is the issue, it just mean that SPI library should not deselect device via SS pin, but in your case SS pin is not managed by SPI library it is manage by your application code (because you made the choice to no provide ss pin totransfer()function). Also I don't see maxWrite() call in maxWrite(), address, value1 and value2 parameters are declared as int (aka 32bit), and they are data to transfer, |
Beta Was this translation helpful? Give feedback.
-
OK so as I understand there are 2 device on SPI2 and 1 on SPI1. |
Beta Was this translation helpful? Give feedback.
-
I need to use two SPI ports in a STM32F401. (SPI1 (PA7, PA6, PA5)😉 and SPI2 (PB15, PB14, PB13) MOSI MISO SCLK
pins repectively.
I declared SPIClass SPI_2(PB15, PB14, PB13); in my sketch and it works, but SPI1 don´t work and craches the processor.
SPI.begin();
SPI_2.begin(); //Initiallize the SPI 2
SPI_2.beginTransaction(SPI_SETTINGS)
Beta Was this translation helpful? Give feedback.
All reactions