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.

  • Resolved

MSP430FR6043: Issue with MSP_LEA_CONVERT_ADDRESS

Prodigy 20 points

Replies: 3

Views: 54

Part Number: MSP430FR6043

Hello!

I'm running the sample program of transform_ex1_fft_fixed_q15 and have an issue. It is in the API called "msp_biquad_df1_q15".

There is a line:

    LEAPMS1 = MSP_LEA_CONVERT_ADDRESS(leaParams);

When it is run, the program expect an interrupt after command completion but never received it. I turned off LPM0 and it is still the same.

I have changed the program LEA RAM locations to the ones for MSP430FR6043. I have also checked the memory locations for leaParams - they seem to be in the LEA stack (the end of LEA RAM, 0x00005Fxx in 6043).

Earlier in the same file, LEA addresses was checked with these code and no issues was reported:

/* Check that length parameter is a multiple of two. */
if (length & 1) {
return MSP_SIZE_ERROR;
}

/* Check that the data arrays are aligned and in a valid memory segment. */
if (!(MSP_LEA_VALID_ADDRESS(src, 4) &
MSP_LEA_VALID_ADDRESS(dst, 4) &
MSP_LEA_VALID_ADDRESS(params->states, 4) &
MSP_LEA_VALID_ADDRESS(params->coeffs, 4))) {
return MSP_LEA_INVALID_ADDRESS;
}

/* Check that the correct revision is defined. */
if (MSP_LEA_REVISION != msp_lea_getRevision()) {
return MSP_LEA_INCORRECT_REVISION;
}

/* Acquire lock for LEA module. */
if (!msp_lea_acquireLock()) {
return MSP_LEA_BUSY;
}
#endif //MSP_DISABLE_DIAGNOSTICS

Could you please give me some direction on how to debug this issue? Does this have something to do with putting the data into some memory locations that both CPU and LEA can access? Is the address I mentioned above meet the requirements?

Also I've searching for more detailed instructions about LEA on the internet and the best I can find is the FAQ along with the local DSP Lib user guide. So if you could point me to more documentations that would be helpful.

Thanks,

Xiyao

 

  • Hi Xiyao,

    I don't think msp_biquad_df1_q15 is called in the sample program transform_ex1_fft_fixed_q15. This sample program only calls msp_fft_fixed_q15() which in turn calls msp_cmplx_fft_fixed_q15().

    What is the "status" returned below in transform_ex1_fft_fixed_q15.c?

    status = MAP_msp_fft_fixed_q15(&fftParams, input);

    That should give an indication of what the problem might be.

    The only literature on LEA is the FAQ document you referred and http://www.ti.com/lit/pdf/slaa698.

    Srinivas

  • In reply to Srinivas Lingam:

    Hi Srinivas,

    The function msp_biquad_df1_q15 I was referring to is in the part of the program that generates the input signal. The initSignal() function calls "status = msp_sinusoid_q15(&sinParams, temp)", which in turn calls "status = msp_biquad_df1_q15(&df1Params, dst, dst)" in its line 86 to generate a sinusoidal.

    The function is stuck in the specific macro MSP_LEA_CONVERT_ADDRESS(leaParams), waiting for the interrupt at the completion of the command. Oddly enough the previous line "LEAPMS0 = MSP_LEA_CONVERT_ADDRESS(src);" was completed correctly. One of the differences between them is that the src is pointed to 0x00005200 and leaParams is pointed to 0x00005FDC. The former is in regular LEA RAM and the latter is in LEA stack. Does it matter? 

    Therefore no status is returned because the function was not finished...

    Could you give me more explanation on how the MSP addresses is mapped to LEA addresses? The only thing I can find is that the variables should be in a specific memory section. The address I got from the debugging environment related to leaParams was mentioned in my original post. Does this sample code work for you? If so, on what MSP device?

    Thanks,

    Xiyao 

  • In reply to Xiyao Zhang1:

    Hi Xiyao,

    leaParams should not be in the LEASTACK portion. 

    Based on the following in lnk_msp430fr6043.cmd, you need to make sure leaParams are in the LEARAM space, which extends till 0x5EC7.

    --------------------------------------------

    #define LEASTACK_SIZE 0x138

    MEMORY
    {
    LEARAM_0 : origin = 0x4000, length = 0x1000
    LEARAM : origin = 0x5000, length = 0x1000 - LEASTACK_SIZE
    LEASTACK : origin = 0x6000 - LEASTACK_SIZE, length = LEASTACK_SIZE
    }

    --------------------------------------------

    The memory map for the shared RAM between MSP CPU and LEA can be found in Table 6-52. Memory Organization in the device datasheet (https://www.ti.com/lit/ds/symlink/msp430fr6043.pdf)

    The mapping from this MSP address to LEA internal address is not documented in the App notes but I think it just uses the lower 16-bits. I am not sure this is relevant to the application as the issue you are running into is because the leaParams structure is mapped inside the memory assigned to LEASTACK while that is dedicated for the internal operation of the LEA module.

    Srinivas

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.