Vybrid with MQX: A5 crashes when M4 is started.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Vybrid with MQX: A5 crashes when M4 is started.

ソリューションへジャンプ
2,443件の閲覧回数
sandrobastos
Contributor IV

Hello everybody,

I'm working with TWR-VF65GS10 and trying to run an M4 MQX application while my main application runs on A5 core.

If I run them separately, they go fine.

When I try to run them together, the A5 application stops when the M4 is started.

I went setp to step and found out that A5 crashes when M4 DMA is started:

module: C:\Freescale\Freescale_MQX_4_1\mqx\source\io\dma\edma.c

routine: static int edma_reset_module(int edma_module)

line of the M4 initialization that crashes the other core (A5):

/* Halt, cancel transfer and wait until transfer is canceled */
DMA_CR_REG(edma_base) = DMA_CR_CX_MASK | DMA_CR_HALT_MASK;

I'm using MQX in both cores; IAR with I-Jet or J-Link.

thank you,

karinavalencia

DavidS

BrunoCastelucci

josepalazzi-b02602

1 解決策
2,104件の閲覧回数
cyborgnegotiato
Senior Contributor II

Hi Sandro,

It is MQX bug - it will be fixed in 4.1.1.

The fast and dirty fix is disable DMA for one core and remove DMA initialization (function dma_init) from BSP initialization code (from _bsp_init function).

Regards,

Jozef

元の投稿で解決策を見る

0 件の賞賛
返信
10 返答(返信)
2,104件の閲覧回数
sandrobastos
Contributor IV

I’ve disabled the DMA for SPI0 in ‘twrvf65gs10_a5.h’ and it’s now working.

Do you think it’s a MQX bug?

I don’t know if it’s a good solution, but at least I can go further with the project.

/*

** Use DMA transfers on SPI0

** MGCT: <option type="bool"/>

*/

#ifndef BSPCFG_DSPI0_USE_DMA

#define BSPCFG_DSPI0_USE_DMA                0 //??

#endif

Best regards,

0 件の賞賛
返信
2,105件の閲覧回数
cyborgnegotiato
Senior Contributor II

Hi Sandro,

It is MQX bug - it will be fixed in 4.1.1.

The fast and dirty fix is disable DMA for one core and remove DMA initialization (function dma_init) from BSP initialization code (from _bsp_init function).

Regards,

Jozef

0 件の賞賛
返信
2,104件の閲覧回数
sandrobastos
Contributor IV

Hi Jozef / Alejandro,

Bug fixed at MQX 4.1.1. both cores are working with full DMA.

Thank you,

alejandrolozano

cyborgnegotiator

2,104件の閲覧回数
cyborgnegotiato
Senior Contributor II

Hi Sandro,

Please close this question if you do not have more questions to discussion.

Thanks,

Jozef

2,104件の閲覧回数
sandrobastos
Contributor IV

I'm sorry, I couldn't find out how to close it.

0 件の賞賛
返信
2,104件の閲覧回数
alejandrolozan1
NXP Employee
NXP Employee

Hi Sandro,

You can just mark the answer as correct.

Best Regards,

Alejandro

0 件の賞賛
返信
2,104件の閲覧回数
sandrobastos
Contributor IV

Hi Jozef,

Thank you for your help. I had already disabled the DMA for SPI on A5. Now I turned it on again and disabled the entire DMA for M4.

/** Initialization - called from init task, usually for io initialization.

*/

int _bsp_init(void) {

    uint32_t result;

    /* Initialize DMA */

    /*??

    result = dma_init(_bsp_dma_devif_list);

    if (result != MQX_OK) {

        return result;

    }

    */

   

I'll wait for MQX 4.1.1.

best regards,

Sandro,

0 件の賞賛
返信
2,104件の閲覧回数
alejandrolozan1
NXP Employee
NXP Employee

Hi Sandro,

Is it possible for you to share your project? I would like to help you debugging the problem.

Best Regards,

Alejandro

0 件の賞賛
返信
2,104件の閲覧回数
sandrobastos
Contributor IV

Dear Alejandro,

As a matter of fact, the A5 doesn't crash. What really happens is that my task that updates the LCD though SPI is blocked.

It happens at the exact moment that the first byte is sent to LCD, after M4 has been started:

/* Write instruction, address and data to buffer */
result = fputc((int)data, spifd);

If you need anyother part of my code, or some dump, please tell me.

thank you,

0 件の賞賛
返信
2,104件の閲覧回数
sandrobastos
Contributor IV

Hi Alejandro,

Thanks for your attention.

I created two very simple MQX applications, one for A5 and another for the M4 and they work well together.

If I put my original full A5 project the problem comes back so I'll debug it a little bit more to find out what module or task is blame for this issue.

As soon I have more information I post here.

Thank you and best regards...

0 件の賞賛
返信