Vinicius, have you meant 0x4A300000 + 0x1000 as the frist shared mem address to be used?
Em seg, 18 de jan de 2021 11:50, Vinicius Juvinski < [email protected]> escreveu: > One detail, > > If I not wrong, the first 100 bytes of the dram is used by pru for some > configs, register and other stuffs I don't remember right now, so you > should use BASE Address +1000 at least > > > > https://www.ti.com/lit/ug/spruh73q/spruh73q.pdf?ts=1610923856664 - > section 4.3 details the memory usage from PRU. > > > > > Em seg., 18 de jan. de 2021 às 10:14, Gerhard Hoffmann < > [email protected]> escreveu: > >> Hi, >> >> just for the mapping, you won't need most of the include files. >> >> I often include xyz.h in xyz.c so that I get at least a warning when I >> change >> >> sth. so that the public promises in .h no longer hold. >> >> pru_if.h is in the post but not needed. >> >> Remove the includes and the compiler will tell you what is missing. >> >> You definitely don't need ltcsrv.h and the stuff for nice(). >> >> >> - A file descriptor must be used for /dev/mem: >> >> >> int dev_mem_fd; >> dev_mem_fd = open("/dev/mem",O_RDWR | O_SYNC); >> >> >> - Shared RAM is mapped (prepared for use) by this line: >> >> >> shared_ram = (int *) mmap(NULL, 12*1024, PROT_READ | PROT_WRITE, >> MAP_SHARED, dev_mem_fd, 0x4A300000 + 0x10000); >> >> >> - Here follows examples of usage (in this case, writing to shared ram >> memory): >> >> >> shared_ram[0] = ... ; //write to 0x4A310000 >> shared_ram[1] = ... ; //write to 0x4A310004 >> shared_ram[1] = ... ; //write to 0x4A310008 >> >> ^!! >> >> >> Am I right? >> >> Yes. >> >> I should have snipped a lot of text, but was only half awake. >> >> Cheers, Gerhard >> >> >> >> -- >> 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 [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/beagleboard/32141ab3-a346-b184-90bc-5c9bc810d169%40hoffmann-hochfrequenz.de >> <https://groups.google.com/d/msgid/beagleboard/32141ab3-a346-b184-90bc-5c9bc810d169%40hoffmann-hochfrequenz.de?utm_medium=email&utm_source=footer> >> . >> > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/beagleboard/CAB6xwCr%3DA6UKZ0z8SJQyNPRxCdb0%3DPvBfQx_%3DA-g86j4gqj%2BQA%40mail.gmail.com > <https://groups.google.com/d/msgid/beagleboard/CAB6xwCr%3DA6UKZ0z8SJQyNPRxCdb0%3DPvBfQx_%3DA-g86j4gqj%2BQA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAJK9pqedmY%2B75GshLrqT02%3DLFQMTPNR202B3Q7%2BY0WPido%3Dujg%40mail.gmail.com.
