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.

AM2434: AM2434 GPMC read/write function question

Part Number: AM2434

Tool/software:

Hi, TI expert,

I am trying to communicate with an FPGA using GPMC on custom AM2434 hardware, employing address/data multiplexed, synchronous burst read/write mode. During actual use, there are some timing issues, such as being able to read only 2 bytes of data instead of 64 bytes. Below are some of my register configurations:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* GPMC attributes */
static GPMC_HwAttrs gGpmcAttrs[CONFIG_GPMC_NUM_INSTANCES] =
{
{
.gpmcConfig1 =
{
.wrapBurst = CSL_GPMC_CONFIG1_WRAPBURST_WRAPNOTSUPP,
.readMultipleFlag = CSL_GPMC_CONFIG1_READMULTIPLE_RDMULTIPLE,
.writeMultipleFlag = CSL_GPMC_CONFIG1_WRITEMULTIPLE_WRMULTIPLE,
.readType = CSL_GPMC_CONFIG1_READTYPE_RDSYNC,
.writeType = CSL_GPMC_CONFIG1_WRITETYPE_WRSYNC,
.attachedDevicePageLength = CSL_GPMC_CONFIG1_ATTACHEDDEVICEPAGELENGTH_THIRTYTWO,
.waitReadMonitoring = CSL_GPMC_CONFIG1_WAITREADMONITORING_WMONIT,
.waitWriteMonitoring = CSL_GPMC_CONFIG1_WAITWRITEMONITORING_WMONIT,
.waitMonitoringTime = CSL_GPMC_CONFIG1_WAITMONITORINGTIME_ATVALID,
.waitPinSelect = CSL_GPMC_CONFIG1_WAITPINSELECT_W0,
.deviceSize = CSL_GPMC_CONFIG1_DEVICESIZE_SIXTEENBITS,
.deviceType = CSL_GPMC_CONFIG1_DEVICETYPE_NORLIKE,
.muxAddrData = CSL_GPMC_CONFIG1_MUXADDDATA_MUX,
.timeParGranuLarity = CSL_GPMC_CONFIG1_TIMEPARAGRANULARITY_X1,
.fclkDivider = CSL_GPMC_CONFIG1_GPMCFCLKDIVIDER_DIVBY1,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

there is few question about GPMC:

1. I want to achieve a burst read/write operation of 16bit * 32word. Are there any issues with my register configurations?

2. What is the specific function of wrapBurst? I checked the reference manual's description, but I didn't understand it. Are there more specific resources available, and does this function only support certain chips?

3. Since I configured deviceType to 16bit and attachedDevicePageLength to 32words, I believe the data transfer amount for one GPMC operation is 16bit * 32words = 64bytes. Here is my GPMC read/write function:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
typedef struct
{
uint8_t data[64];
} DataStruct64;
int32_t GPMC_NormalRead(GPMC_Handle handle, GPMC_Transaction *trans)
{
DataStruct64 data64;
int32_t status = SystemP_SUCCESS;
if (handle == NULL && trans == NULL) {
status = SystemP_FAILURE;
return status;
}
GPMC_Object *object = ((GPMC_Config*)handle)->object;
const GPMC_HwAttrs *attrs = ((GPMC_Config*)handle)->attrs;
uint32_t byteCount = trans->count;
if (object->operMode == GPMC_OPERATING_MODE_POLLING) {
if (trans->transType == GPMC_TRANSACTION_TYPE_READ) {
uint32_t baseAddress = GPMC_DATA_BASE_ADDRESS;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Based on *pDst = *pSrc, it can be seen that I am performing read/write operations in increments of 64 bytes. Is my implementation correct? Additionally, if I perform a pointer assignment operation using uint16_t*, does this mean that the GPMC only transfers 2 bytes at a time?

4. Regarding write operations, I believe that after copying data to the CSL_GPMC0_DATA_BASE address, the GPMC data transmission will be triggered automatically. However, for read operations, when I perform a copy operation from the CSL_GPMC0_DATA_BASE address, this copy operation gets blocked until the GPMC read timing is complete. Is my understanding correct?