Project

General

Profile

Hello World on DSP

Added by Arun Krishnan 16 days ago

Hi,

I want to run a hello world application on DSP and I want to load/run this from the arm core.

I am using the AM57F devkit and want to use the pins UART5_TXD and UART5_RXD pins that are available as GPIOs in J11 (T9 and R6 pins). I am using a custom-image generated by this link:https://support.criticallink.com/redmine/projects/mitysom_am57x/wiki/Linux_Kernel_Yocto_for_MitySOM-AM57X
I have done the following steps
1. cd rtos_sdk>pdk
2. create the UART_example project under pdk/packages/MyExampleProjects using the pdkProjectCreate.sh script
./pdkProjectCreate.sh AM574x all little spi all dsp
3. Used the TI sys config tool and default MitySOM devkit pin mux to generate the files and replaced the original files with pdk_am57xx_1_0_x\packages\ti\board\src\idkAM572x with the new ones
4. Rebuilt the pdk library and import the UART_example project to CCS and build it.
5. Update the device tree (am57xx-mitysom-custom.dts)
I am having the following questions?
1. How and where to set up the UART clock source and speed?
2. How to add the UART5 to the devicetree? and what are the properties for this uart?
My sample device tree entree for UART5 is

&uart5 {    

    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&uart5_pins>;

uart5: serial@4001800 {    
    compatible = "ti, am57xx-uart" 
    reg = <0x48066000 0x10000>;  /* Base address and size */
interrupts = <xxxx>;  /* IRQ number and type */    
clocks = <xx>;  /* Clock identifier */    
clock-names = "uart5";    
dmas = <&dmas 0 0>;  /* DMA settings */    
dma-names = "tx", "rx";    
ti,hwmods = "uart5";    
status = "okay";    
};    
};    

Here what properties to be given for pinctrl-names,pinctrl-0,compatible ,interrupts, clocks ,clock-names etc. ?

Thanks in advance for the support
Regards,
Arun


Replies (5)

RE: Hello World on DSP - Added by Jonathan Cormier 15 days ago

If the DSP is going to be controlling the UART, then UART5 will need to be disabled in the kernels device tree. Otherwise the ARM and DSP may both try to control the same hardware.

I will look into the UART example. I would have expected it to already have the code needed to configure baud rate and set up clocks.

RE: Hello World on DSP - Added by Arun Krishnan 15 days ago

Hello Jonathan,
Thank you for the reply.
I was under the impression that I need to make the device tree entry also.

So, I will have a look at the uart example app the baud rate and clock settings.
I my doubts are listed below
1. For the uart5 pins to get enabled, rebuilding the pdk with new pin mix files is enough?
2. How can we change the Uart instance in the example code and while changing the uart instance, the memory map will also get updated? If no, how can we do that?

Thanks in advance

RE: Hello World on DSP - Added by John Pruitt 14 days ago

Arun,

We don't have first-hand experience with this particular demo. We can look into it but it will take some time. In the meantime, you might want to submit an E2E question. There could be someone at TI who does have first-hand experience with this demo that may be able to help quicker.

Thanks.

RE: Hello World on DSP - Added by Arun Krishnan 8 days ago

Hello John,

Sorry for the delayed response. I have posted a similar question on E2E regarding the memory mapping on boards other than TI's idk, they have advised to take the support from the board manufacturer. I will again submit a question on E2E regarding changing the UART instance/updating memory map of the peripheral.

It will be great if you can provide a hello world example on wiki page. I know you have already provided a wiki page for adding ipc, but to make use of that we need to access a peripheral from DSP.

Regards,
Arun

RE: Hello World on DSP - Added by Jonathan Cormier 3 days ago

Arun Krishnan wrote in RE: Hello World on DSP:

Hello Jonathan,
Thank you for the reply.
I was under the impression that I need to make the device tree entry also.

So, I will have a look at the uart example app the baud rate and clock settings.

Can you share the path to the uart example app?

I my doubts are listed below
1. For the uart5 pins to get enabled, rebuilding the pdk with new pin mux files is enough?

The pinmux should be set up by u-boot, there should be no need to touch the pinmux in the DSP. There is a wiki page, on how to configure the pinmux in u-boot. https://support.criticallink.com/redmine/projects/mitysom_am57x/wiki/U-Boot_Setup_Pinmux

2. How can we change the Uart instance in the example code and while changing the uart instance, the memory map will also get updated? If no, how can we do that?

Changing the UART instance, has to change the memory locations the TI UART driver is using. If it doesn't, then it would be a bug with their provided driver. There does appear to be lots of references to UART5 in the RTOS SDK source, including in some DRA7 and am57 header files, so I'd be surprised if it didn't work.

We currently don't have the time to create a UART hello world example for the DSP. However, if you had some code you could share, we could review it.

    (1-5/5)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)