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.
Tool/software: TI-RTOS
Hi:
When I operated GPIO2_27 on the DSP terminal, I found that I couldn't control the high and low level.
GPIO2_27PIN:
root@am57xx-evm:~# devmem2 0x4A0034D4
/dev/mem opened.
Memory mapped at address 0xb6f49000.
Read at address 0x4A0034D4 (0xb6f494d4): 0x0001000E
When I change the GPIO2_27 to GPIO4_4, I can control it at the DSP end.
Software version RTOS_4.3 AM5728
#include <stdlib.h> #include <xdc/std.h> #include <xdc/runtime/Diags.h> #include <xdc/runtime/Error.h> #include <xdc/runtime/Log.h> #include <xdc/runtime/System.h> /* package header files */ #include <ti/ipc/Ipc.h> #include <xdc/runtime/Registry.h> #include <ti/ipc/MessageQ.h> #include <ti/ipc/MultiProc.h> #include <ti/sysbios/BIOS.h> #include <ti/sysbios/knl/Task.h> #include <ti/drv/gpio/GPIO.h> #include <ti/drv/gpio/soc/GPIO_v1.h> #include "../shared/AppCommon.h" #define MODULE_NAME "Server" /* module structure */ typedef struct { UInt16 hostProcId; // host processor id MessageQ_Handle slaveQue; // created locally } Server_Module; //GPIO4_4, GPIO4_9, GPIO2_27 GPIO_PinConfig gpioPinConfigs[] = { GPIO_DEVICE_CONFIG(0x04, 0x04) | GPIO_CFG_OUTPUT, GPIO_DEVICE_CONFIG(0x04, 0x09) | GPIO_CFG_OUTPUT, GPIO_DEVICE_CONFIG(0x02, 0x27) | GPIO_CFG_OUTPUT, GPIO_DEVICE_CONFIG(0x04, 0x03) | GPIO_CFG_OUTPUT //GPIO_DEVICE_CONFIG(0x03, 0x28) | GPIO_CFG_OUTPUT, //GPIO_DEVICE_CONFIG(0x03, 0x29) | GPIO_CFG_OUTPUT, //GPIO_DEVICE_CONFIG(0x03, 0x30) | GPIO_CFG_OUTPUT, }; /* GPIO Driver call back functions */ GPIO_CallbackFxn gpioCallbackFunctions[] = { NULL, NULL, NULL }; GPIO_v1_Config GPIO_v1_config = { gpioPinConfigs, NULL, sizeof(gpioPinConfigs) / sizeof(GPIO_PinConfig), //sizeof(gpioCallbackFunctions) / sizeof(GPIO_CallbackFxn), 0, 0, }; Void MessageTask(UArg arg0, UArg arg1); Int main(Int argc, Char* argv[]) { Error_Block eb; Task_Params taskParams; Error_init(&eb); Task_Params_init(&taskParams); taskParams.instance->name = "smain"; taskParams.arg0 = (UArg)argc; taskParams.arg1 = (UArg)argv; taskParams.stackSize = 0x4000; Task_create(MessageTask, &taskParams, &eb); if (Error_check(&eb)) { System_abort("main: failed to create application startup thread"); } GPIO_init(); /* start scheduler, this never returns */ BIOS_start(); return (0); } Void MessageTask(UArg arg0, UArg arg1) { Int status = 0; UInt index = 0; UInt GpioNum = 0; Server_Module Module; MessageQ_Params msgqParams; App_Msg * msg; MessageQ_QueueId queId; Module.hostProcId = MultiProc_getId("HOST"); MessageQ_Params_init(&msgqParams); Module.slaveQue = MessageQ_create("DSP1", &msgqParams); if ( Module.slaveQue == NULL ) goto messageq_create_err; GpioNum = sizeof(gpioPinConfigs) / sizeof(GPIO_PinConfig); while ( TRUE ) { status = MessageQ_get(Module.slaveQue, (MessageQ_Msg *)&msg, MessageQ_FOREVER); if (status < 0) { break; } if ( msg->cmd == 0xFF) { for ( index = 0; index < GpioNum; index++ ) GPIO_write(index, 1U); } else { for ( index = 0; index < GpioNum; index++ ) GPIO_write(index, 0U); } queId = MessageQ_getReplyQueue(msg); MessageQ_put(queId, (MessageQ_Msg)msg); } MessageQ_delete(&Module.slaveQue); return; messageq_create_err: return ; }
Hi:
When I control GPIO4_4, I can detect high and low levels through the oscilloscope, but I can't detect it when I control GPIO2_27.
{VIN2A_D3, (M14 | PIN_OUTPUT_PULLDOWN)}, /* vin2a_d3.gpio4_4 */
{GPMC_BEN1, (M14 | PIN_OUTPUT_PULLDOWN)}, /* gpmc_ben1.gpio2_27 */
Thanks
HI:
Linux situation may cause GPIO2_27 not available on the DSP side?
When I change GPIO2_27 to GPIO8_21, I get the following error message.
GPIO8_21 PIN
When entering the following information, there is no error when loading firmware from the new one. What is going on?
echo 245 > /sys/class/gpio/export
echo out > /sys/clas/gpio/gpio245/direction
cd /sys/bus/platform/drivers/omap-rproc
echo 40800000.dsp > unbind
echo 40800000.dsp > bind
Why is this again?
Is the oscilloscope still unable to detect the GPIO8_21 pin level?
Thanks
A15 terminal controls GPIO2_27 high and low level.
Software version: TI_SDK 4.3, hardware version: AM5728-ES2.0, custom board
Hi
Thank you very much for your reply, I have tried this situation.
I looked at the GPIO2_GPIO_OE, GPIO2_GPIO_DATAOUT register values, GPIO2_GPIO_OE Register 27bit is 0.
GPIO_write(0, 1U) is called at the DSP end. The value of GPIO2_GPIO_DATAOUT 27bit is always 0, which is equivalent to GPIO_write.
When the DSP side writes 0 or 1 to the 27th bit of 0x4805_513C, it can control the high and low levels.
Thanks