Can you elaborate a little bit on the timing issue you found? In particular,
can you walk through the timing using the timing data found in the shift
register datasheet, the AM335x datasheet, and expecting timings on the PRU?
I think a quick write up like this would be useful for other PRU interfacing
applications. Pointing which timing spec was violated and how to avoid writing
code that violates timing. Right now, it seems like you have learned by
experience that the PRU is fast enough to violate 74HC logic timing so having
a quick recipe so others don't do the same thing would be valuable.
Historically, these timings are largely a hardware thing but the use case of
the PRU exposes purely software programmers to the same issue.
On Monday, August 17, 2020 18:43:57
deepank...@gmail.com wrote:
> This is a *Week 9 *report for GSoC2020 project Parallel Bidirectional Bus
> <
https://elinux.org/BeagleBoard/GSoC/2020_Projects/PRU_Bi-dir_bus>. I
> finally resolved the blocker that i had last time. Further added shell
> scripts and unit files to configure the required pin configuration
> automatically on boot. Also finished most of documentation in the readme
> files.
> *Accomplishments:*
>
> - Updated all the readme files with content that would help others
> understand and execute the code. gitlink
> <
https://github.com/deebot/Beaglebone-BidirectionBus/tree/dev>
> - Added shell scripts and unit files to automate PRU pin configuration
> on boot.
> - Resolved the blocker form last time.
>
> *Resolution to blockers:*
> The issue was due to the fact that the the pulse width of clock pulse
> was too less to be registered by the shift register.
>
> *Plans for the week:*
>
> - Will be discussing the next steps with Jason and Saketh tomorrow in a
> googlemeet
> - Will finish up the wiki page
> - Will Write some blog posts about the tricky things that i observed
> while working with pocketbeagle.
>
>
>
> On Wednesday, August 12, 2020 at 4:17:58 PM UTC+2
deepank...@gmail.com
>
> wrote:
> > This is a *Week 8 *report for GSoC2020 project Parallel Bidirectional Bus
> > <
https://elinux.org/BeagleBoard/GSoC/2020_Projects/PRU_Bi-dir_bus>. I
> > worked on finishing up my bidirectional communication and documentation.
> > The blocker last time is not completely solved but now the data can flow
> > in both the direction. In one of the meeting abhishek pointed out that my
> > earlier implementation of getting the data from the payload received is
> > not correct. So i corrected it. However i am still not getting correct
> > data values inside the kernel module. There seems to be some issue in
> > getting the inputs from shift register.Linux module part is performing as
> > it should. I tried several things to resolve it. I replicated the same
> > code as in PRU in the Arduino and i was able to get the right input values
> > in the PISO mode, then i checked the bitwise operations multiple times on
> > online compiler like
python-tutor.com where i could visualize the
> > intermediate values, the only thing that i could gather from there is
> > that
> > the bit wise operations that i am doing are right.I also tried to see the
> > inputs on beaglelogic but it is not working for me,I am able to connect to
> > it using the sigrock it doesnot show anything. I also worked on the issue
> > with my primary mentor on remote desktop connection but still no solution.
> > Further, as per my discussion with my primary mentor i am asked to go
> > down the gpiochip path and raise a PR to the beaglebone linux repo as my
> > end goal.
> > *Accomplishments:*
> >
> > - The repository has been restructured and code has been cleaned, link
> > <
https://github.com/deebot/Beaglebone-BidirectionBus/tree/dev>
> > <
https://deebot.github.io/whatsnext.html>
> > - Added wiki page wiki
> > <
https://github.com/deebot/Beaglebone-BidirectionBus/wiki>
> >
> > *On-going blockers:*
> >
> > - The shift register in PISO mode doesnot
> >
> > *provide right state of inputs *
> >
> > *Plans for the week:*
> >
> > - Resolving the blocker
> > - Finishing the documentation
> >
> > On Tuesday, August 4, 2020 at 9:08:05 AM UTC+2, Deepankar Maithani wrote:
> >> This is a *Week 7 *report for GSoC2020 project Parallel Bidirectional Bus
> >> <
https://elinux.org/BeagleBoard/GSoC/2020_Projects/PRU_Bi-dir_bus>. So
> >> last week i worked on studying the different ways to implement a
> >> parallel
> >> bus. Went through the documentation for SPI bus, parallel address and
> >> data
> >> bus in 8088 and the communication between the parallel port and
> >> printer.
> >> *Accomplishments:*
> >>
> >> - worked on the possible protocol to implement a parallel bus on
> >> pocket beagle and wrote it in a Blog.
> >> <
https://deebot.github.io/whatsnext.html>
> >> - Wrote a skeleton code for parallel bus similar to the bus in 8088.
> >> - Resolved the blocker: I was not able to transfer data from kernel
> >> module to the userspace through my gpiochip driver. This works now.
> >>
> >> *On-going blockers:*
> >>
> >> -
> >>
> >> *The shift register in PISO mode seems to send constant value 0xae
> >>
> >> everytime irrespective of the state of buttons connected to the input
> >> pins.
> >> This need to be fixed *
> >>
> >> *Plans for the week:*
> >>
> >> - Resolving the blocker
> >> - Further plans i will update after the meeting today. From the
> >> comments on my previous evaluation , it seems i only have to implement
> >> a
> >> gpiochip driver now. But will seek further clarification from the
> >> mentors
> >> and will update
> >>
> >> On Tuesday, July 28, 2020 at 1:17:22 AM UTC+2, Deepankar Maithani wrote:
> >>> This is a *Week 6 *report for GSoC2020 project Parallel Bidirectional
> >>> Bus <
https://elinux.org/BeagleBoard/GSoC/2020_Projects/PRU_Bi-dir_bus>.
> >>> So i would start with briefly summerising the main achievements of the
> >>> project so far. So now user can send data from the userspace to the
> >>> kernel
> >>> and then kernel passes it on to the PRU using rpmsg .PRU receives 9 bit
> >>> of
> >>> data and depending upon the 9th bit being 1 or 0 it configures it as
> >>> SIPO or PISO shift registor . Also data can flow from shift register to
> >>> PRU to linux kernal to linux userspace. Here there is a issue in
> >>> transfering data from kernal to userspace.This is currently a blocker.
> >>> I
> >>> spent time resolving it but as i also had exam on 27 July, So i couldnot
> >>> completely resolve it,
> >>> *Accomplishments:*
> >>>
> >>> - Wrote user space application to send and receive data. The
> >>> GPIOchip driver exposes chardev interface which is used along with
> >>> libgpiod
> >>> to send and receive data.
> >>> - Implemented a protocol to switch modes . The gpiochip driver
> >>> controls 9 lines out of which 8 are used to send required data and 1
> >>> for
> >>> sending the mode data
> >>> - Tested the modes on the hardware
> >>>
> >>> *On-going blockers:*
> >>>
> >>> - *In PISO mode data received from the PRU in the kernal module
> >>> could not be assigned to the value interface from where it could be
> >>> read
> >>> using the userspace code.*
> >>>
> >>> *Plans for the week:*
> >>>
> >>> - Resolving the blocker
> >>> - Work on the Platform Bus/parallelport
> >>> - blogposts on GPIOchip driver and usage
> >>>
> >>> On Tuesday, July 14, 2020 at 7:43:02 PM UTC+2, Deepankar Maithani wrote:
> >>>> his is a *Week 5 *report for GSoC2020 project Parallel Bidirectional
> >>>> Bus <
https://elinux.org/BeagleBoard/GSoC/2020_Projects/PRU_Bi-dir_bus>.
> >>>> This week i worked on the resolution of previous week blocker and
> >>>> succeeded
> >>>> in resolving it and then i worked on the gpiochip driver. To achieve my
> >>>> objective i first had to build my understanding of how everything works
> >>>> and
> >>>> why do we need this driver when we already have a char driver. So I had
> >>>> a
> >>>> extra meeting with saketh and Abhishek apart form my scheduled
> >>>> wednesday
> >>>> and thrusday meetings. With the new understanding i could proceed
> >>>> with my
> >>>> coding. I also went through documentations and gpio driver samples .
> >>>> Some
> >>>> important mentions are: sysfs
> >>>> <
https://www.kernel.org/doc/Documentation/filesystems/sysfs.txt>, gpio
> >>>> <
https://www.kernel.org/doc/Documentation/gpio/sysfs.txt>, chapter 14
> >>>> and 15 in John Madeu book titled Linux device driver development .
> >>>> *Accomplishments:*
> >>>>
> >>>> - Wrote a gpiochip driver to expose the interfaces in sysfs.
> >>>> - Resolved the issues with interrupt and channel settings so that
> >>>> the rpmsg code could be run on PRU0. Updated and tested my 74HC299
> >>>> code to
> >>>> include rpmsg.
> >>>> - Wrote a patch to port the hc-sr04 range sensor codecode, which
> >>>> currently can run on PRU1 . Now can also be run on PRU0 after
> >>>> applying the
> >>>> patch. Here is the pull request
> >>>> <
https://github.com/dinuxbg/pru-gcc-examples/pull/12>
> >>>> - Wrote a BlogPost <
https://deebot.github.io/rpmsgPRU.html> to
> >>>> explain about the differences in resource table and other files to
> >>>> implement rpmsg on different PRU cores.
> >>>>
> >>>> *On-going blockers: *
> >>>>
> >>>> -
> >>>>
> >>>> *The issue was because of the Host to channel mapping in the resource
> >>>>
> >>>> table file was not set properly. More can be read about it in the
> >>>> Blogpost
> >>>> <
https://deebot.github.io/rpmsgPRU.html> *
> >>>>
> >>>> *Plans for the week:*
> >>>>
> >>>> - Finish the GPIO driver and start with Platform driver.
> >>>>
> >>>> On Monday, July 6, 2020 at 11:40:51 PM UTC+2, Deepankar Maithani wrote:
> >>>>> his is a *Week 4 *report for GSoC2020 project Parallel Bidirectional
> >>>>> Bus
> >>>>> <
https://elinux.org/BeagleBoard/GSoC/2020_Projects/PRU_Bi-dir_bus>.
> >>>>> I had to travel out of the country and had an exam last week so
> >>>>> couldnot
> >>>>> spend much time
> >>>>> *Accomplishments:*
> >>>>>
> >>>>> - Reconfigured the hardware as i had to disassemble everything to
> >>>>> bring along with me on my journey
> >>>>> - Made a dummy code by translating the truth table for 74hc299
> >>>>>
> >>>>> *On-going blockers: code doesnot*
> >>>>>
> >>>>> -
> >>>>>
> >>>>> *Sometimes the code running on pru 1 gives a warning
> >>>>>
> >>>>> pruss_intc_irq_set_affinity: event 16 not configured and data is
> >>>>> not
> >>>>> pushed out *
> >>>>>
> >>>>> *Plans for the week:*
> >>>>>
> >>>>> - Implementation of PRU firmware for IC 74hc299 Universal
> >>>>> register
> >>>>> - Updating blog post
> >>>>> - resolution the blocker
> >>>>>
> >>>>> On Tuesday, June 30, 2020 at 3:23:03 PM UTC+2, Deepankar Maithani
> >>>>>
> >>>>> wrote:
> >>>>>> Also i forgot to mention. One of my Pull Request was merged
> >>>>>> <
https://github.com/dinuxbg/pru-gcc-examples/pull/6.> This will
> >>>>>> make it easy and quick to understand input and output control
> >>>>>> using PRU
> >>>>>> for anybody starting to work with PRUGCC. Unlike the earlier examples
> >>>>>> this
> >>>>>> code manipulates specific pin values rather than the whole register.
> >>>>>>
> >>>>>> On Tuesday, June 30, 2020 at 3:00:10 PM UTC+2, Deepankar Maithani
> >>>>>>
> >>>>>> wrote:
> >>>>>>> This is a *Week 3 *report for GSoC2020 project Parallel
> >>>>>>> Bidirectional Bus
> >>>>>>> - Implemented communication between ARM and PRU using rpmsg
> >>>>>>> - Now a userspace code can send msg to the PRU core and then
> >>>>>>> PRU converts it into binary data
> >>>>>>> - I could send and receive messages from arm to PRU and vice
> >>>>>>> versa
> >>>>>>> - The code and Readme on the repository has been updated and
> >>>>>>> schematic is also added to interface 74hc595.
> >>>>>>>
> >>>>>>> *On-going blockers: code doesnot*
> >>>>>>>
> >>>>>>> -
> >>>>>>>
> >>>>>>> *Sometimes the code running on pru 1 gives a warning
> >>>>>>>
> >>>>>>> pruss_intc_irq_set_affinity: event 16 not configured and data is
> >>>>>>> not
> >>>>>>> pushed out *
> >>>>>>>
> >>>>>>> *Plans for the week:*
> >>>>>>>
> >>>>>>> - Implementation of PRU firmware for IC 74hc299 Universal
> >>>>>>> register
> >>>>>>> - Updating blog post
> >>>>>>>
> >>>>>>> On Monday, June 22, 2020 at 8:25:29 PM UTC+2, Deepankar Maithani
> >>>>>>>
> >>>>>>> wrote:
> >>>>>>>> This is a *Week 2 *report for GSoC2020 project Parallel
> >>>>>>>> Bidirectional Bus
> >>>>>>>> <
https://elinux.org/BeagleBoard/GSoC/2020_Projects/PRU_Bi-dir_bus>.
> >>>>>>>> The
> >>>>>>>> 74hc595 was up and running and I spent most of the time this week
> >>>>>>>> studying
> >>>>>>>> about accessing the physical memory and writing and reading to
> >>>>>>>> it. SInce
> >>>>>>>> it was very new domain to me
> >>>>>>>>
> >>>>>>>> it took alot of time to get my head around it. Concrete
> >>>>>>>>
> >>>>>>>> accomplishments are less for this week but i went through all the
> >>>>>>>> background that was needed to achieve my objective. Went through
> >>>>>>>> several
> >>>>>>>> documents and stackoverflow posts but two note worthy resources i
> >>>>>>>> focused
> >>>>>>>> on are:
> >>>>>>>> chapter Name: Using I/O Memory: in book titled Linux Device Driver
> >>>>>>>> 3rd Edition , page no 249 Onwards
> >>>>>>>> Chapter Name: Kernel Memory Managment: in book titled Linux Device
> >>>>>>>> Driver Development-John Madieu
> >>>>>>>> *Accomplishments:*
> >>>>>>>>
> >>>>>>>> - Studied about the memory mapping and memory access
> >>>>>>>> - Wrote a basic driver to read and write from OCMC shared
> >>>>>>>> memory space
> >>>>>>>> - Added a new blogpost about shared memory A quick guide to
> >>>>>>>> shared memory <
https://deebot.github.io/sharedMemory.html>
> >>>>>>>> - Also sharing the video of interfacing that i made last week
> >>>>>>>> but forgot to share Interfacing 74hc595
> >>>>>>>> - Build understanding of Ring Buffers and interrupts
> >>>>>>>> - Reading data from shared memory in a PRU Code
> >>>>>>>> - Update the blog posts
> >>>>>>>>
> >>>>>>>> On Monday, June 15, 2020 at 10:34:50 PM UTC+2, Deepankar Maithani
> >>>>>>>>
> >>>>>>>> wrote:
> >>>>>>>>> Hello All
> >>>>>>>>>
> >>>>>>>>> This is a *Week 1 *report for GSoC2020 project Parallel
> >>>>>>>>> Bidirectional Bus
> >>>>>>>>> <
https://elinux.org/BeagleBoard/GSoC/2020_Projects/PRU_Bi-dir_bus>
> >>>>>>>>> .
> >>>>>>>>> My approach is to move a little from both the ends ie the PRU code
> >>>>>>>>> and
> >>>>>>>>> GPIO chip driver and then finally connect both the parts.
> >>>>>>>>>
> >>>>>>>>> *Accomplishments:*
> >>>>>>>>>
> >>>>>>>>> - Understood how the inline ASM works as some include files
> >>>>>>>>> were using it and wrote a code to alter only specific pin
> >>>>>>>>> values using
> >>>>>>>>> masking bits
> >>>>>>>>> - Figured out how R30 and R31 bits corresponds to the pins on
> >>>>>>>>> the Header
> >>>>>>>>> - Wrote first test code for shift register.
> >>>>>>>>> - Wrote a simple GPIO chip driver
> >>>>>>>>> - Added a new blogpost about mapping pins PRURegisterMapping
> >>>>>>>>> <
https://deebot.github.io/PRURegisterMapping.html>
> >>>>>>>>>
> >>>>>>>>> *Resolutions to blockers:*
> >>>>>>>>>
> >>>>>>>>> It dawned upon me . :) that there is no need to connect
> >>>>>>>>> beaglebone black wireless running Beaglelogic with the laptop, it
> >>>>>>>>> can work
> >>>>>>>>> by connecting over wifi. The other issue where i was not able to
> >>>>>>>>> see the
> >>>>>>>>> signals on the pulseview was solved by reinstalling updating and
> >>>>>>>>> readjusting the Sampling rate and number of samples.
> >>>>>>>>>
> >>>>>>>>> *On-going blockers:*
> >>>>>>>>>
> >>>>>>>>> -
> >>>>>>>>>
> >>>>>>>>> *N/A *
> >>>>>>>>>
> >>>>>>>>> *Plans for the week:*
> >>>>>>>>>
> >>>>>>>>> - Figureout how will the GPIO driver send commands to PRU
> >>>>>>>>> - Getting the 74HC595 up and running with PRU
> >>>>>>>>> - Update the blog posts
> >>>>>>>>>
> >>>>>>>>> On Sunday, June 7, 2020 at 11:56:26 AM UTC+5:30, Deepankar
> >>>>>>>>>
> >>>>>>>>> Maithani wrote:
> >>>>>>>>>> Hello All
> >>>>>>>>>>
> >>>>>>>>>> This is a *Week 0 *report for GSoC2020 project Parallel
> >>>>>>>>>> Bidirectional Bus
> >>>>>>>>>> <
https://elinux.org/BeagleBoard/GSoC/2020_Projects/PRU_Bi-dir_bus
> >>>>>>>>>> >my
> >>>>>>>>>> mentors for the project are Jason Kridner,KumarAbhishek,Saketh,
> >>>>>>>>>> Drew
> >>>>>>>>>> Fustini, Hunyue Yau and , rma. I will publish all my weekly
> >>>>>>>>>> reports through
> >>>>>>>>>> this thread,
> >>>>>>>>>> I have also created a blog website for progress tracking and for
> >>>>>>>>>> posting .Also some blog posts explaining how to do some important
> >>>>>>>>>> stuff can
> >>>>>>>>>> be seen on Blog posts
> >>>>>>>>>> <
https://deebot.github.io/blogs.html>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> *Accomplishments:*
> >>>>>>>>>>
> >>>>>>>>>> - Installed PRU-GCC , compiled simple codes that run on PRU
> >>>>>>>>>> and worked with remoteproc to load firmware
> >>>>>>>>>> - Resolved installation issues with Beaglelogic and set it
> >>>>>>>>>> up to view communication with shift registers
> >>>>>>>>>> - Wrote simple character driver to understand the intricacies
> >>>>>>>>>> - Went through gpio chip driver.
> >>>>>>>>>>
> >>>>>>>>>> *Resolutions to blockers:*
> >>>>>>>>>> N/A
> >>>>>>>>>>
> >>>>>>>>>> *On-going blockers:*
> >>>>>>>>>>
> >>>>>>>>>> -
> >>>>>>>>>>
> >>>>>>>>>> *When i connect my Pocketbeagle and Beaglebone wireless with my
> >>>>>>>>>>
> >>>>>>>>>> Laptop at the same time , i can only log in one of them. The
> >>>>>>>>>> issue is
> >>>>>>>>>> because on both the boards the usb interfaces are assigned
> >>>>>>>>>> same IP address.
> >>>>>>>>>> I need to figureout a way to solve this as i would be using
> >>>>>>>>>> beaglelogic on
> >>>>>>>>>> my beaglewireless to analyse communication between PRU of
> >>>>>>>>>> pocketbeagle and