- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For a PSoC 4 design...
While using SPI Master component (SPIM) to communicate with an external SPI Slave, I want the option to disable the SPI Master. I plan to switched the SPI Master function off using the SPIM_STOP().
After: SPIM_STOP(), what state will extenally connected pins be set to including: CS_N, SCLK, MOSI and MISO
These 4 lines are shared with other devices. If they don't automatically tri-state when the SPI Master component is stopped, can I force the pin into a tri-state mode directly or is there a better way to tri-state external pins driven by an SCB based component.
Greg
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi GrCa_1363456,
The component takes care of SPI master output pins (CLK and SS) to the following settings:
1. CLK is set to the inactive state settings based on CPOL in the configurator. CPOL: 0 - Set 0 ; CPOL :1 - Set 1
2. SS pin is set to the active high SS or active low SS setting in the configurator Active high- Set 0; Active low - Set 1
You can find the above information in SPI_SpiStop() in <SCB_name>_SPI.c
3. MOSI is set to strong drive
4. MISO is set to input pin (digital Hiz) - input buffer ON.
If you need to force them to analog HiZ, you can use the pin component APIs that is in the generated source.
You can set the drive mode using the API as shown above. Use 0 as the parameter to set it to analog Hiz.
Regards,
Bragadeesh
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi GrCa_1363456,
The component takes care of SPI master output pins (CLK and SS) to the following settings:
1. CLK is set to the inactive state settings based on CPOL in the configurator. CPOL: 0 - Set 0 ; CPOL :1 - Set 1
2. SS pin is set to the active high SS or active low SS setting in the configurator Active high- Set 0; Active low - Set 1
You can find the above information in SPI_SpiStop() in <SCB_name>_SPI.c
3. MOSI is set to strong drive
4. MISO is set to input pin (digital Hiz) - input buffer ON.
If you need to force them to analog HiZ, you can use the pin component APIs that is in the generated source.
You can set the drive mode using the API as shown above. Use 0 as the parameter to set it to analog Hiz.
Regards,
Bragadeesh
Bragadeesh