2147 views|6 replies

82

Posts

0

Resources
The OP
 

[Infineon PSOC 62S4 PIONEER KIT Review]——SPI [Copy link]

This post was last edited by bitter on 2023-4-19 18:02

[ Infineon PSOC 62S4 PIONEER KIT Review]——SPI

  • Basic Introduction

By reading the data sheet, I found that the PSOC 62S4 PIONEER KIT has six Serial Communication Blocks (SCBs), all of which can be configured in SPI mode, supporting Motorola SPI, TI Secure Simple Pairing (SSP) and Naional Microwire, operating at up to 25Mhz. When acting as a host, it supports up to four slaves, supports 8-bit or 16-bit data frame size, and supports changing the baud rate during data transmission.

2. Introduction to main APIs

1.SPI initialization cyhal_spi_init()

Among them, the cyhal_spi_mode_t enumeration is

  1. SPI event enable cyhal_spi_enable_event()

Among them, the cyhal_spi_event_t structure is

3. SPI Simple Program

Function description: Send data starting from 0. Each time data is sent, the data value increases by 1, the LED flips and prints out the data value.

Program Description:

1.SPI initialization, MOSI pin is P0_2, MISO pin is P0_3, clock pin is P0_4, chip select pin is P0_5, 8-bit data frame, clock polarity and phase are both 0, high bit first, SPI is configured as master

2. Set the SPI clock frequency to 1Mhz

3.SPI sends data

PS:

1. When using a logic analyzer to analyze, it was found that when using cyhal_spi_transfer() and cyhal_spi_transfer_async() to send data, the parsed data was incorrect. I don't know if it was due to the logic analyzer, the wiring, or some other reason.

VID_20230418_082336

main.c

1.61 KB, downloads: 0

源代码

This post is from RF/Wirelessly

Latest reply

thanks for sharing!   Details Published on 2023-4-21 16:02
 

6822

Posts

11

Resources
2
 
The author of the post is really good, the progress is so good, I look forward to continuing the exciting work.
This post is from RF/Wirelessly
 
 

6063

Posts

4

Resources
3
 
Thanks for sharing!
This post is from RF/Wirelessly
 
 
 

6027

Posts

6

Resources
4
 

ADC initialization cyhal_spi_init(), typo, looking forward to better trial

This post is from RF/Wirelessly

Comments

Thanks, modified  Details Published on 2023-4-19 18:24
Personal signature

在爱好的道路上不断前进,在生活的迷雾中播撒光引

 
 
 

82

Posts

0

Resources
5
 
Qintianqintian0303 posted on 2023-4-18 13:03 ADC initialization cyhal_spi_init(), typo, looking forward to better trial

Thanks, modified

This post is from RF/Wirelessly
 
 
 

6570

Posts

0

Resources
6
 

Follow the host to learn PSOC 62S4 PIONEER KIT

This post is from RF/Wirelessly
 
 
 

7

Posts

0

Resources
7
 

thanks for sharing!

This post is from RF/Wirelessly
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

快速回复 返回顶部 Return list