SPI register and demo
Re: SPI register and demo
Postby kajtusize » Mon Mar 07, 2016 4:08 pm
I've been struggling with SPI slave, almost same story as here viewtopic.php?f=7&t=1540&p=5113
The functions 0x04 and 0x05 are not working, actually I didn't succeed with any function! Any possible update/help!
Thanks!
The functions 0x04 and 0x05 are not working, actually I didn't succeed with any function! Any possible update/help!
Thanks!
Re: SPI register and demo
Postby xPhyiscs » Fri Sep 16, 2016 4:55 pm
Hey !
I have some unanswered questions, which I could not find anything on the internet, about esp8266 , I want to use spi port of esp8266. Before it I check with probe the clock pin, there are huge noisy data or ı do not understand what it is ! I never see such a clock signal before. image is the below from the scope
I do not try the code you give above, If I try it , it will work ?
I work with nodemcu esp8266 , there is no problem like that , when I take the board there is no clock signal so I can simply use the spi port of the board?
I need information about spi port of the esp8266 what you produce. My knowledge just in limitation that it is connected to flash chip to get data !
Thanks for help..
I have some unanswered questions, which I could not find anything on the internet, about esp8266 , I want to use spi port of esp8266. Before it I check with probe the clock pin, there are huge noisy data or ı do not understand what it is ! I never see such a clock signal before. image is the below from the scope
- SCR03.PNG (9.51 KiB) Viewed 25547 times
- SCR04.PNG (9.24 KiB) Viewed 25547 times
I do not try the code you give above, If I try it , it will work ?
I work with nodemcu esp8266 , there is no problem like that , when I take the board there is no clock signal so I can simply use the spi port of the board?
I need information about spi port of the esp8266 what you produce. My knowledge just in limitation that it is connected to flash chip to get data !
Thanks for help..
Re: SPI register and demo
Postby pratik » Sat Sep 17, 2016 8:33 pm
Hello,
If you are using the Espressif nonOS or RTOS SDK to write your application, please use the following to set the GPIO to act as HSPI interface pins:
// Configure MUX to allow HSPI
WRITE_PERI_REG(PERIPHS_IO_MUX, 0x105);
// SCK, MOSI, MISO and CS
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDI_U, 2);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTCK_U, 2);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTMS_U, 2);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDO_U, 2);
Not writing the correct value to the IO_MUX will cause problems like this in most cases.
If you are using the Espressif nonOS or RTOS SDK to write your application, please use the following to set the GPIO to act as HSPI interface pins:
// Configure MUX to allow HSPI
WRITE_PERI_REG(PERIPHS_IO_MUX, 0x105);
// SCK, MOSI, MISO and CS
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDI_U, 2);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTCK_U, 2);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTMS_U, 2);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDO_U, 2);
Not writing the correct value to the IO_MUX will cause problems like this in most cases.
Re: SPI register and demo
Postby pratik » Mon Sep 19, 2016 11:02 am
It is definitely possible, provided you code things right. Be it Arduino or any other interface - in the end it comes down to writing the proper values to the appropriate registers.
I personally am not familiar with the Arduino IDE + ESP8266 so I cannot help with this directly. But there might be libraries that get the job done.
I personally am not familiar with the Arduino IDE + ESP8266 so I cannot help with this directly. But there might be libraries that get the job done.

Re: SPI register and demo
Postby xPhyiscs » Mon Sep 19, 2016 2:22 pm
Actually I am not fan of arduino ide.
To use esp which development environmet should be better ? Can you give me any link to set up ? Ayn tutorial ?
Also how can you learn this ? Where can I find documantation about these ?
To use esp which development environmet should be better ? Can you give me any link to set up ? Ayn tutorial ?
// Configure MUX to allow HSPI
WRITE_PERI_REG(PERIPHS_IO_MUX, 0x105);
// SCK, MOSI, MISO and CS
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDI_U, 2);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTCK_U, 2);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTMS_U, 2);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDO_U, 2);
Also how can you learn this ? Where can I find documantation about these ?
Who is online
Users browsing this forum: No registered users and 14 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.