Part Number: AM5728
I am working with a AM5728 SOM which is connected to a baseboard with two LED's attached to GPIO1_28 and GPIO1_29. My end solution will require parallel reads and writes, in a clock constrained environment, so being able to write to two GPIO's in a single clock cycle is necessary. I am attempting to solve this via using direct memory access on the IPU, such as writing data directly to the physical address. So far, I have been unsuccessful in being able to get either of the LED's to toggle (regardless of polarity of the set command). Right now, the writes are two sequential operations, eventually it will be translated into one mask so it can be executed in one cycle.
Below is a generalized setup, on how I am attempting to write to the LEDs:
Setup:
#define LED1OutConfigRegister 0x4AE10000 + 0x00000134
#define LED2OutConfigRegister 0x4AE10000 + 0x00000134
#define LED1_RegisterShift 29
#define LED2_RegisterShift 28
#define GPIO1_Clock_Base_address 0x4AE07838
#define CTRL_CORE_PAD_GPMC_A6 0x4A003458
#define CTRL_CORE_PAD_GPMC_A7 0x4A00345C
#define LED1SetRegister 0x4AE10000 + 0x00000194
#define LED2SetRegister 0x4AE10000 + 0x00000194
*(uint32_t*)LED1OutConfigRegister &= ~(1 << LED1_RegisterShift);
*(uint32_t*)LED2OutConfigRegister &= ~(1 << LED2_RegisterShift);
*(unsigned int*)GPIO1_Clock_Base_address = (unsigned int)(0x00000101);
*(uint32_t*)CTRL_CORE_PAD_GPMC_A6 = 0x0000000E;
*(uint32_t*)CTRL_CORE_PAD_GPMC_A7 = 0x0000000E;
Writing the LED's:
*(uint32_t*)LED1SetRegister |= 1 << LED1_RegisterShift;
*(uint32_t*)LED2SetRegister |= 1 << LED2_RegisterShift;
I can't think of anything I can miss of the top of my head, are there any suggestions for driving these LED's, especially in a parallel manner?
Also, is there a means of getting the M4 to write to STDOUT on the Linux OS?