Page 1 of 1

How i can disable automatic CS from SPI

Posted: Mon Dec 23, 2024 6:13 pm
by BugSimpson
good evenig,

i use a c3 in spi master mode.
which register must be write to handle the cs pin by my self?
i have try to disable the mapping for FSPICS0 but i become a cs from about 40ns (see picture)

thx

Re: How i can disable automatic CS from SPI

Posted: Tue Dec 24, 2024 6:46 pm
by username
.spics_io_num = -1, // GPIO pin for CS signal, or -1 if not used.

Re: How i can disable automatic CS from SPI

Posted: Wed Dec 25, 2024 9:15 am
by BugSimpson
I dont use the framework.
I want to now how I can do this with Register…

Re: How i can disable automatic CS from SPI

Posted: Wed Dec 25, 2024 12:06 pm
by ok-home
watch TRM
disable in spi registers
spi_cs.JPG
esp32c3 trm
spi_cs.JPG (93.95 KiB) Viewed 2065 times

or do not connect in gpio iomux/matrix
spimux.JPG
spimux.JPG (149.5 KiB) Viewed 2065 times
or set gpio level to 1

Code: Select all

gpio_reset_pin(CS);
gpio_set_direction(CS,GPIO_MODE_OUTPUT);
gpio_set_level(CS,1);

Re: How i can disable automatic CS from SPI

Posted: Wed Dec 25, 2024 6:39 pm
by BugSimpson
i allready have try this, have you seen my picture in #1?
there you can see short spikes.. i dont no why^^

Re: How i can disable automatic CS from SPI

Posted: Wed Dec 25, 2024 11:00 pm
by ok-home
if you get this picture after this

Code: Select all

#define CS 1
gpio_reset_pin(CS);
gpio_set_direction(CS,GPIO_MODE_OUTPUT);
gpio_set_level(CS,0);
look for external sources of interference
this code completely disables all interfaces and sets logic 0 on the CS output (GPIO1).