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.

PROCESSOR-SDK-AM335X: Lab 3 pin modes

Part Number: PROCESSOR-SDK-AM335X

Hi.

I am not using CCS to realize the labs because I don't have a JTAG :(

I successfully realized previous PRU labs, but I can't get Lab 3 to work.

Both firmwares compile and are loaded by PRUs, but the expected behaviour (red LED for warming and blue LED for cooling) doesn't occur.

Which pins must be in which mode to get Lab 3 working? I'm using the following:

P8_30 pruout	OUT_1WIRE on code temp_monitor_slave_0.c for PRU0 (PR1_PRU_EDIO_DATA_OUT5)
P8_16 pruin	IN_1WIRE on code temp_monitor_slave_0.c for PRU0 (PR1_PRU0_GPI14)
P8_44 pruout	GPIO_BLUE on code temp_monitor_slave_1.c for PRU1 (PR1_PRU1_GPO3)
P8_42 pruout	GPIO_RED on code temp_monitor_slave_1.c for PRU1 (PR1_PRU1_GPO5)
P8_41 pruout	GPIO_GREEN on code temp_monitor_slave_1.c for PRU1 (PR1_PRU1_GPO4)

Thanks in advance.

  • Hello Henrique,

    If you got through PRU Hands-On Labs 1 and 2, I'm assuming you know how to set up pinmuxing properly. If you use CCS, then you would run the PRU_CAPE.gel script to set up pinmuxing. In your PRU Software Support Package, please take a look at pru_cape/PRU_CAPE.gel to get the pinmux settings.

    Regards,

    Nick

  • Hi, Nick.

    Thank you for your answer.

    I know how to pinmux with Beaglebone's config-pin. But I'm not understanding what configurantion I need to realize.

    Looking at PRU_CAPE.gel  as you said and at the temp_monitor_master_1.c, I understood that ECAP pin(s?) must be configured. But I'm not understanding how.

    From PRU_CAPE schematics, there are:

    • PR1_ECAP0_IN_PWM0_OUT on pin P9_42 and
    • PR1_PRU0_GPI15 on pin P8_15

    From PRU_CAPE.gel:

    hotmenu ENABLE_ECAP_LOOP()
    {
    
    //**********************************************************
    //                                      PRU input
    //**********************************************************
    
            // J4 pin 2 = pr1_pru0_gpi15 (GPMC_AD15 - mode 6)
            *((unsigned int*) 0x44e1083C) = AM335X_PIN_INPUT | 6; //mode 6
    
    //**********************************************************
    //                                      ECAP_PWM output
    //**********************************************************
    
            // J4 pin 1 = pr1_ecap0_in_pwm0_out  (ECAP0_IN_PWM0_OUT - mode 3)
            *((unsigned int*) 0x44e10964) = AM335X_PIN_INPUT | 3; //mode 7
    }

    I tried setting P9_42 and P8_15 as pru_ecap, but the expected behaviour doesn't appears...

    I don't know what I am missing...

  • Hi.

    I have tried to look for more information about the pin modes that make things work, but I couldn't find anything that defines these modes...

    Could anyone point me which pins should be in which mode?

    Thanks!

  • Hello Henrique,

    How exactly are you doing the pinmuxing? Here is the documentation for TI's Pin Mux Tools. If you are using a pinmux tool created by a different community, you will have to ask them for assistance.

    Regards,

    Nick

  • I'm on Beaglebone Black, using config-pin.

    Here is the configuration that I'm using.

    P8_30 pruout    OUT_1WIRE on code temp_monitor_slave_0.c for PRU0 (PR1_PRU_EDIO_DATA_OUT5)
    P8_16 pruin     IN_1WIRE on code temp_monitor_slave_0.c for PRU0 (PR1_PRU0_GPI14)
    P8_44 pruout    GPIO_BLUE on code temp_monitor_slave_1.c for PRU1 (PR1_PRU1_GPO3)
    P8_42 pruout    GPIO_RED on code temp_monitor_slave_1.c for PRU1 (PR1_PRU1_GPO5)
    P8_41 pruout    GPIO_GREEN on code temp_monitor_slave_1.c for PRU1 (PR1_PRU1_GPO4)
    I guess that I just need to know the right configuration.

    If you could indicate the right pin modes (1, 2, 3, ..., 7) for the Lab 3 of PRU's Hands On, it would be a great start.
    Or ask for someone that knows which modes should be activated for the pins.
    Thanks.
  • We do not support "config-pin" on these forums.

    If you are unsure of what pinmux modes to use to get an internal signal pinned out to the pin, you can reference the AM335x Datasheet, section Terminal Configuration and Functions. e.g., you can look at "PRU0/General-Purpose Inputs Signals Description" to figure out what balls a PRU signal can come out of.

    Regards,

    Nick

  • Hi Nick. 

    I would appreciate a lot if you could just answer which mode each pin should, I will stop bothering you.

    I am not asking for config-pin modes. I already read the documents you pointed out.

    I know that each pin can have up to 7 modes. I'm asking about these modes.

    When you tell me about them, I will do the remaining research.


    TL;DL: Just, please, say which of the seven modes each pin should be.

  • Hello Henrique,

    This is going to be my last response.

    Let's say I want to figure out the pinmux for PR1_PRU0_GPI14. Go to datasheet section "PRU0/General-Purpose Inputs Signals Description". Go to signal name pr1_pru0_pru_r31_14. Click the link on the ball number. This takes you to Table 4-1, where you can see that pr1_pru0_pru_r31_14 can be routed out of pin GPMC_AD13 using muxmode 6. You also could have gotten that information from the pinmux tool I pointed to earlier.

    Regards,

    Nick