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.

AM1705 / OMAPL137 PRU uart error

Other Parts Discussed in Thread: AM1808

Hi,

I am using EVM OMAPL137 board along with L13x UART expansion Daughter card for PRU software UART test.

According to the PRU start up test guide we have to first patch the current PSP version with PRU patch, I have patched the kernel successfully.

After that I have configured the Kernel with following option for PRU:

CONFIG_SERIAL_SUART_OMAPL_PRU=m & CONFIG_OMAPL_SUART_FW_SOURCE="patch to the source file of uart"

In the startup guide they have also mentioned how to build the firmware using a shell script to get PRU_SUART_Emulation.bin.

The PRU_SUART_Emulation.bin file is copied to the /lib/firmware/omap_pru in filesystem & also into the kernel firmware/omap_pru/ folder.

The kernel compiles properly & PRU module also compile properly without any error. The PRU module is installed in the lib/module/2.6.33-rc4/kernel/drivers/serial/omap_pru/suart_emu.ko.

But Here the issue is that after the kernel boots up & when we try to load module using modprobe suart_emu.ko command it say Module suart_emu.ko not found, even though the module exits in the filesystem.

And I have also tried compiling PRU UART module into the kernel, it compiles properly.

But at start up it gives error as

" ti_omap_pru_suart.1:

firmware: requesting PRU_SUART_Emulation.bin

ti_omapl_pru_suart ti_omap_pru_suart.1:

 can,t load firmware "

Even though PRU_SUART_Emulation.bin is in the filesystem /lib/firmware/omapl_pru

Can anyone tell the solution to above problem,

Thanks & Regards

Jitendra

 

  • Hi Jitendra,

    The path to the firmware needs to be included in lib/udev/firmware.sh.  Therefore, make sure "/lib/firmware /lib/firmware/omapl_pru" in the FIRMWARE_DIRS variable as shown below:

    In lib/udev/firmware.sh,

              FIRMWARE_DIRS="/lib/firmware/$(uname -r) /lib/firmware /lib/firmware/omapl_pru"

    For additional details, refer to section 5.5 Configuring the file system of the Quick Start Guide (http://mistralsolutions.com/pes-support/support-downloads/l13x-daughter-card-documentation-software.html#).

    Regards,

    Melissa

  • Hi Melissa,

    I have tried the above given steps.

    I have changed the FIRMWARE_DIRS="/lib/firmware/$(uname -r) /lib/firmware /lib/firmware/omapl_pru" & I also copied the PRU_SUART_Emulation.bin file in the directory given below /lib/firmware/$(uname -r) /lib/firmware /lib/firmware/omapl_pru/ in the filesystem

    I have also commented the line in udev/rules.d/udev.rules:109:ACTION=="add",SUBSYSTEM=="firmware",
    RUN+="/lib/udev/firmware.sh"

    Even after following the above given steps I am getting error as " ti_omapl_pru_suart ti_omap_pru_suart.1: can't load firmware "

    May be this is the issue of PRU_SUART_Emulation.bin file.

    Thanks for your reply.

    Can you please look into the above issue.

    Thanks & Regards

    Jitendra

  • Hi Jitendra,

    From my experience, the "can't load firmware" error when installing the module has resulted because the module cannot locate the firmware (ie. the path is either not set or not set correctly). 

    Mistral's website contains Pre-built Binary files.  Can you download this file and compare the set-up of their lib directory with yours?  In particular, you can compare the two files you modified and the location of PRU_SUART_Emulation.bin?

    To confirm, the error message you are now seeing is identical to the one described in your first post?

    Regards,

    Melissa

  • Hi Melissa,

    I got the PRU SUART module loaded into the kernel

    I followed the filesystem example available at Mistral site.

    But when I tried send data using microcom example as given in the test setup guide , I was not able to send or receive data.

    I used microcom -s 57600 /dev/ttySU0 ,ttySU1,ttySU2 but still no data.

    Can you please help me on above given query

    Thanks & Regards

    Jitendra

  • Hi Jitendra,

    Check the following in your pru/hal/uart/include/omapl_suart_board.h file: 

          1.  Which UART numbers are being mapped to serializers and UART ports?  In the file, PRU_SUART1 corresponds to /dev/ttySU0, PRU_SUART2 to /dev/ttySU1, etc. 

          2.  Are the UARTs you are trying to use enabled?  (ie. #define PRU_SUART2_CONFIG_DUPLEX (PRU_SUART_HALF_TX | PRU_SUART_HALF_RX), not #define PRU_SUART2_CONFIG_DUPLEX (PRU_SUART_HALF_TX_DISABLED | PRU_SUART_HALF_RX_DISABLED)

    Refer to the Quick Start Guide on Mistral's website for additional configuration options.

    Regards,

    Melissa

  • Hi Melissa,

    In the omap_suart_board.h I have added the following changes

    #define PRU_SUART1_CONFIG_DUPLEX (PRU_SUART_HALF_TX | PRU_SUART_HALF_RX)
    #define PRU_SUART1_CONFIG_RX_SER (PRU_SUART_SERIALIZER_10)
    #define PRU_SUART1_CONFIG_TX_SER (PRU_SUART_SERIALIZER_11)

    I have kept PRU_SUART1_CONFIG_RX_SER as PRU_SUART_SERIALIZER_10 & PRU_SUART1_CONFIG_TX_SER as  PRU_SUART_SERIALIZER_11 because SoftUART1_RXD is connected AxR1[10] & SoftUART1_TXD is connected to AxR1[11].

    #define PRU_SUART2_CONFIG_DUPLEX (PRU_SUART_HALF_TX_DISABLED | PRU_SUART_HALF_RX_DISABLED)
    #define PRU_SUART2_CONFIG_RX_SER (PRU_SUART_SERIALIZER_NONE)
    #define PRU_SUART2_CONFIG_TX_SER (PRU_SUART_SERIALIZER_NONE)

    similarly as PRU_SUART2, PRU_SUART3 to PRU_SUART8 are disabled.

    In suart_api.h I have kept default option.

    #define  PRU_ACTIVE        SINGLE_PRU

    Are the above options appropriate or not.

    I am still not able to get the uart data.

    Please Revert back on above query

    Thanks & Regards

    Jitendra

     

     

  • Hi Jitendra,

    Those options all look correct.  You should be connecting to port P3 on the Mistral daughtercard and communicating using /dev/ttySU0.

    Also, for OMAPL137 / AM17x, you should compile the firmware for McASP1 using the following command:

              # pasm -b  -DMCASP1 uart/PRU_SUART_Emulation.p bin/PRU_SUART_Emulation

    Regards,

    Melissa

  • Hello Melissa,

    PRU UART1 is working.

    The issue was in firmware compilation as mentioned in your previous post.

    But let me know why you wanted me to check on port3 of UART expansion board.

    Thanks & Regards

    Jitendra

  • Hi Jitendra,

    Your omap_suart_board.h file showed that serializers 10 and 11 were mapped to PRU_SUART1 (or /dev/ttySU0).  The UART expansion board schematics show that these serializers (10 and 11) are connected in hardware to P3.

    Regards,

    Melissa

  • Hello Sir,

    I am working with AM1808. I want to interface GSM module with my processor.

    I have made all the changes in Mux.h and da850.c as per my requirement . Now i am trying to create the uImage for my kernel.

    When i Run the command for the make I found following error and process terminates,

    bi-
      CHK     include/linux/version.h
      CHK     include/generated/utsrelease.h
    make[1]: `include/generated/mach-types.h' is up to date.
      CALL    scripts/checksyscalls.sh
      CHK     include/generated/compile.h
      Kernel: arch/arm/boot/Image is ready
      SHIPPED arch/arm/boot/compressed/lib1funcs.S
      AS      arch/arm/boot/compressed/lib1funcs.o
      LD      arch/arm/boot/compressed/vmlinux
      OBJCOPY arch/arm/boot/zImage
      Kernel: arch/arm/boot/zImage is ready
      Building modules, stage 2.
      MODPOST 5 modules
    make[1]: *** No rule to make target `firmware/omapl_pru/PRU_SUART_Emulation.bin', needed by `__fw_modbuild'.  Stop.

  • Hi Parthiv,

    You can resolve this error by commenting out the following line in firmware/Makefile:

    fw-shipped-$(CONFIG_SERIAL_SUART_OMAPL_PRU) += omapl_pru/PRU_SUART_Emulation.bin 

    However, please make sure you are using the latest soft-UART solution available here.  The above change is already made in the latest code.  

    Regards,

    Melissa