How i can disable automatic CS from SPI

BugSimpson
Posts: 22
Joined: Fri Oct 11, 2024 2:14 pm

How i can disable automatic CS from SPI

Postby BugSimpson » Mon Dec 23, 2024 6:13 pm

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
Attachments
snip.JPG
snip.JPG (120.81 KiB) Viewed 2444 times

username
Posts: 593
Joined: Thu May 03, 2018 1:18 pm

Re: How i can disable automatic CS from SPI

Postby username » Tue Dec 24, 2024 6:46 pm

.spics_io_num = -1, // GPIO pin for CS signal, or -1 if not used.

BugSimpson
Posts: 22
Joined: Fri Oct 11, 2024 2:14 pm

Re: How i can disable automatic CS from SPI

Postby BugSimpson » Wed Dec 25, 2024 9:15 am

I dont use the framework.
I want to now how I can do this with Register…

User avatar
ok-home
Posts: 157
Joined: Sun May 02, 2021 7:23 pm
Location: Russia Novosibirsk
Contact:

Re: How i can disable automatic CS from SPI

Postby ok-home » Wed Dec 25, 2024 12:06 pm

watch TRM
disable in spi registers
spi_cs.JPG
esp32c3 trm
spi_cs.JPG (93.95 KiB) Viewed 2063 times

or do not connect in gpio iomux/matrix
spimux.JPG
spimux.JPG (149.5 KiB) Viewed 2063 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);

BugSimpson
Posts: 22
Joined: Fri Oct 11, 2024 2:14 pm

Re: How i can disable automatic CS from SPI

Postby BugSimpson » Wed Dec 25, 2024 6:39 pm

i allready have try this, have you seen my picture in #1?
there you can see short spikes.. i dont no why^^

User avatar
ok-home
Posts: 157
Joined: Sun May 02, 2021 7:23 pm
Location: Russia Novosibirsk
Contact:

Re: How i can disable automatic CS from SPI

Postby ok-home » Wed Dec 25, 2024 11:00 pm

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).

Who is online

Users browsing this forum: No registered users and 2 guests