Part Number: PROCESSOR-SDK-AM335X
Hi,
I have to prove SPI and I2C interface on skAM335x board. Can you tell me to which slave they are connected?
In schematic I checked for SPI but I didn't get any slave connected to SPI.
Regards
Gaurav
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: PROCESSOR-SDK-AM335X
Hi,
I have to prove SPI and I2C interface on skAM335x board. Can you tell me to which slave they are connected?
In schematic I checked for SPI but I didn't get any slave connected to SPI.
Regards
Gaurav
Hi,
The AM335x Starter Kit does not have any SPI peripherals on board. SPI is available on the ZigBee header J11.
Yes, but you must be careful not to erase or overwrite the first 64 bytes. See
and processors.wiki.ti.com/.../AM335x_Starter_Kit_ID_Memory_Programming
Hi,
Can I use I2C Example project to write into EEPROM?
How can I prove SPI interface if no slave is connected to SPI?
Regards
Gaurav
Gaurav Aggarwal1 said:Can I use I2C Example project to write into EEPROM?
Yes, you may need to make minor modifications.
Gaurav Aggarwal1 said:How can I prove SPI interface if no slave is connected to SPI?
You can try looping back MOSI to MISO, or connect an external SPI device.
What modifications I need to do? Which example should I use evmAM335x example project or skAM335x example project?
Regards
Gaurav
If you are using the AM335x Starter Kit you should use the skAM335x example project.
Gaurav,
Let me first answer regarding McSPI module. AM335x StarterKit has no McSPI RTOS example or diagnostic test. You can try to reuse AM335x EVM McSPI loopback test and adjust it for your AM335x StarterKit board.
To create the AM335x EVM McSPI loopback test (MCSPI_Loopback_evmAM335x_armExampleProject), run the below command:
pdk_am335x_1_0_14/packages$ ./pdkProjectCreate.sh AM335x evmAM335x little spi all arm
Configures the SPI in loopback mode, transmits a test pattern and receives it back from SPI. This example is intended to demonstrate the SPI LLD API usage on the HW platforms where SPI memory is not available.
Another test you can do is to connect two AM335x StarterKit boards with McSPI modules, then use one board as McSPI master and other board as McSPI slave. But you will need HW modification also. The command you need to run is:
/ti/pdk_am335x_1_0_14/packages$ ./pdkProjectCreate.sh AM335x bbbAM335x little spi all arm
This will create below two project for AM335x BBB board:
MCSPI_SlaveMode_MasterExample_bbbAM335x_armExampleProject
MCSPI_SlaveMode_SlaveExample_bbbAM335x_armExampleProject
You can reuse and adjust this code for your StarterKit boards use case.
See also "MCSPI_slavemode example application" info from below user guide:

Regards,
Pavel
Gaurav,
Regarding I2C validation, we have diagnostic tests that you can run on AM335x SK: eeprom_TEST and pmic_TEST, first one testing the EEPROM ID memory, second one testing Power management chip I2C communication. Refer to the below user guide for info:

There are also sample applications regarding I2C on AM335x SK.
pdk_am335x_1_0_14/packages$ ./pdkProjectCreate.sh AM335x skAM335x little i2c all arm
I2C_Test_skAM335x_armTestProject
I2C_Example_skAM335x_armExampleProject

Regards,
Pavel
Part Number: PROCESSOR-SDK-AM335X
Hi,
I am using PSDK TI-RTOS and skAM335x board. If I use ti\pdk_am335x_1_0_14\packages\MyExampleProjects\I2C_Example_skAM335x_armExampleProject then is will it affect the data of first 64 bytes of ID memory (EEPROM)?
If I change
#define I2C_EEPROM_TEST_ADDR 0x0001
to
#define I2C_EEPROM_TEST_ADDR 0x80 in
C:\ti\pdk_am335x_1_0_14\packages\ti\drv\i2c\test\eeprom_read\src\I2C_board.h. Will it affect first 64 bytes of EEPROM?
.
Regards
Gaurav
Hi,
I am using I2C_skAM335x example project but in debugging mode nothing is coming to terminal. I am not getting whether i2c is working or not.
Regards
Gaurav
Gaurav Aggarwal1 said:I am using PSDK TI-RTOS and skAM335x board. If I use ti\pdk_am335x_1_0_14\packages\MyExampleProjects\I2C_Example_skAM335x_armExampleProject then is will it affect the data of first 64 bytes of ID memory (EEPROM)?
If I change
#define I2C_EEPROM_TEST_ADDR 0x0001
to
#define I2C_EEPROM_TEST_ADDR 0x80 in
C:\ti\pdk_am335x_1_0_14\packages\ti\drv\i2c\test\eeprom_read\src\I2C_board.h. Will it affect first 64 bytes of EEPROM?
From what I understand, this example does not modify EEPROM ID memory. The example only reads 10 bytes from EEPROM memory and stores these 10 bytes in rxBuf[ ] array. txBuf[ ] array is used only to send high address byte (txBuf[0] = 0x0) and low address byte (txBuf[1] = 0x1).
Regards,
Pavel
Gaurav Aggarwal1 said:I am using I2C_skAM335x example project but in debugging mode nothing is coming to terminal. I am not getting whether i2c is working or not.
I2C example does not provide console output on CCS console, but on terminal console.
On my Ubuntu I start terminal session with below command and have the below result in this console.
pbotev@lin-0306:~$ picocom -b 115200 /dev/ttyUSB1
picocom v1.7
port is : /dev/ttyUSB1
flowcontrol : none
baudrate is : 115200
parity is : none
databits are : 8
escape is : C-a
local echo is : no
noinit is : no
noreset is : no
nolock is : no
send_cmd is : sz -vv
receive_cmd is : rz -vv
imap is :
omap is :
emap is : crcrlf,delbs,
Terminal ready
EEPROM data matched
All tests have passed.
Hi,
Now, it is coming to terminal.
But it for reading the data from eeprom.
I want to write data to eeprom and read the same data from eeprom and I want to disply data too in terminal. Can you suggest me how can I do this. I am working on eerpom first time.
Regards
Gaurav
Hi,
How to write data to EEPROM?
What changes I have to made in example code?
Regards
Gaurav
Gaurav,
You can refer to I2C_Test_skAM335x_armTestProject, in first test (i2c_bitrate_test), we have option to write to EEPROM, but this option (I2C_EEPROM_WRITE_ENABLE) is not enabled by default and is designed for K2 EVM only. You might reuse it for your AM335x SK board, but make sure you will not destroy your EEPROM chip.
pdk_am335x/ti/drv/i2c/test/eeprom_read/src/main_test.c
Another approach is to use the pmic_TEST, where I2C module read and write to PMIC by default.
pdk_am335x/packages/ti/board/diag/pmic/
Regards,
Pavel
Hi,
If I enable (I2C_EEPROM_WRITE_ENABLE) for skAM335x board, can you tell what else changes I have to made so that I will not destroy EEPROM chip as well as first 64 bytes of EEPROM.
I want to write and read from 3rd buffer in EEPROM so please suggest changes accordingly. Please explain me in brief.
Regards
Gaurav
Gaurav Aggarwal1 said:If I enable (I2C_EEPROM_WRITE_ENABLE) for skAM335x board, can you tell what else changes I have to made so that I will not destroy EEPROM chip as well as first 64 bytes of EEPROM.
I want to write and read from 3rd buffer in EEPROM so please suggest changes accordingly. Please explain me in brief.
I do not have the list with the exact changes (or a patch) for your specific example customization. What I can suggest you is:
- check AM335x TRM, ch 21 I2C to understand how I2C works and explore its registers and functionallity
- check EEPROM CAT24C256 datasheet

- check AM335x StarterKit user guide, section 3.7.2 Board Identity Memory

- make sure you are writing in the EEPROM free area - Available space for other non-volatile codes/data
- check I2C RTOS driver user guide:

Regards,
Pavel
Hi,
Can you give any other solution. I tried to analyse the code but I am facing problems. I don't know what changes I have to make for writing and reading to EEPROM. If something gets wrong by mistake EEPROM data may gets erased from first 64 bytes or chip may gets damage. Please suggest specific changes in program if possible.
I am using PSDK TI-RTOS for AM335x processor starter kit.
Windows 7 host PC.
Regards
Gaurav