[beagleboard] Re: header file for CCSv6 & PRU

2018-08-21 Thread Hugh Frater
Hi, I found all the required information in the AM335x TRM pdf file. You need to offsets for the I2C module you are using and the base address from the memory map. The programming sequence is all detailed in there under the I2C section. On Tuesday, 21 August 2018 12:44:01 UTC+1, Gaurav S

[beagleboard] Re: header file for CCSv6 & PRU

2018-08-21 Thread Gaurav S
Hugh, Thanks for sharing your research. Any chance you could also include a reference (ie where did you find this info)? Thanks On Friday, August 17, 2018 at 9:43:47 AM UTC-5, Hugh Frater wrote: > > I forgot this from my previous post: > > /* I2C2 register offsets */ > > #define I2C2_STATUSRAW

[beagleboard] Re: header file for CCSv6 & PRU

2018-08-17 Thread Hugh Frater
I forgot this from my previous post: /* I2C2 register offsets */ #define I2C2_STATUSRAW (*((volatile unsigned int*)0x4819C024)) #define I2C2_CNT (*((volatile unsigned int*)0x4819C098)) #define I2C2_SA (*((volatile unsigned int*)0x4819C0AC)) #define I2C2_DATA (*((volatile unsigned

[beagleboard] Re: header file for CCSv6 & PRU

2018-08-17 Thread Hugh Frater
An update: 1. Enable the i2c peripheral clock: #define CM_PER_I2C2 (*((volatile unsigned int *)0x44E00044)) /* Enable I2C2 clock signal generation */ while (!(CM_PER_I2C2 & 0x2)) CM_PER_I2C2 |= 0x2; 2. Setup the registers: /* * set I2C2_PSC register to 0x0B * set