Thx GianFranco, I managed to understand your code, which is well made.
My first test was to verify if I was able to compile the program and see if something goes out of the I2C 1. And yes it works ! I saw something on the scope. Now, I have to modify your code to be able to use the AD7997. Thank you very much for your code and the comment ! Micka, Le mer. 4 nov. 2015 à 12:47, Gianfranco Rosso <gianfranco.ro...@tiscali.it> a écrit : > hello Micka, > > in attach you'll find the archive with both asm and c sources: I've > translated comments to english in order to make them more readable. > > I've used https://github.com/beagleboard/am335x_pru_package as develop > enviroment. > > This example uses 2 I/O expanders (one for inputs and the other for > outputs) and simply echoes the inputs to the outputs: the echo is done into > the c code (that runs in the ARM core) with data passed to and for the PRU > into the RAM. > The PRU manages the I2C1 module for init and refresh the I/O expanders. > > Mux setting of I2C pins have to be done before execution. > It can't be done by the PRU itself because the CONTROL_MODULE can't be > accessed (writing) by the PRU. > So I used cape-universal and a shell script for that. > > > > On Sunday, November 1, 2015 at 10:46:26 PM UTC+1, Mickae1 wrote: >> >> Hi, >> >> I'm interested by what you have done. I want to use i2c to read analog >> value from a component. >> >> The first solution that I found was to bitbang the i2c. But you, you use >> the i2c driver which is nice. >> >> Could you give us the peace of asm code that you use to interface with >> the MCP23017. And if you have the c code also it would be great. >> >> ( if possible, also the part of you managed to activate the module by >> writing MODULEMODE field into register CM_PER_I2C1_CLKCTRL register and >> also the code that wait for IDLEST field to confirm that module is ready). >> >> Micka, >> >> >> -- > For more options, visit http://beagleboard.org/discuss > --- > You received this message because you are subscribed to the Google Groups > "BeagleBoard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to beagleboard+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.