Risto,
You marked my post above as being the Answer to your question. It is not clear why you did that, unless it led to a resolution.
It would be best to have this new question posted to a new thread with an appropriate new title, but I will leave that to you.
[quote user="Risto Hedman"]Error seems to be caused by "Event miss" and it is not related to SPI- clock speed. [/quote]
Ignoring an Event Missed error can be catastrophic. You have not explained why you think it is not related to SPI clock speed. The combination of removing the error handler ISR for illogical reasons, ignoring the underlying error, and expecting the system to work well afterwards does not seem likely to lead to success, to me at least.
[quote user="Risto Hedman"]Could this reinitialization problem be caused by the Edma3CCErrHandlerIsr? Can you propose some "cold start level" de/reinitialization of EDMA?[/quote]
I am confused how this problem could be caused by the ISR that you removed. For a cold-start, Here is some code I found for an older EDMA3-based device. A lot of this may not be relevant to the implementation of EDMA3 in the C6745, but you can delete the parts that write to registers that do not exist. I made a couple of changes to make it more robust in the EMR/SER portion, the alternative to writing to SECR/H 4 times is to write to it until SER stays cleared; the read-write process can be slower than writing 4 times although not likely in this case - I just always do it this way out of habit. This code was written for the C6474 and the addresses and other code will need to be changed to work with your device. If you choose to use this, please re-post your fixed code for future readers (I used the </> icon at the far right of the edit icons for inserting code).
/* use to read / write 32-bit memory mapped register */ #define LOCAL_REG32(addr) *(volatile unsigned int *)(addr) /* zero out all PaRAM */ memset((void*)LOCAL_EDMA_PARAM_BASE, 0x00, 256*32); /* clear any pending EDMA events */ LOCAL_REG32(0x02A01008 /* ECR */) = 0xFFFFFFFF; LOCAL_REG32(0x02A0100C /* ECRH */) = 0xFFFFFFFF; /* clear any pending secondary events */ LOCAL_REG32(0x02A01040 /*SECR */) = 0xFFFFFFFF; LOCAL_REG32(0x02A01044 /*SECRH */) = 0xFFFFFFFF; /* clear any pending secondary events */ LOCAL_REG32(0x02A01040 /*SECR */) = 0xFFFFFFFF; LOCAL_REG32(0x02A01044 /*SECRH */) = 0xFFFFFFFF; /* clear any pending secondary events */ LOCAL_REG32(0x02A01040 /*SECR */) = 0xFFFFFFFF; LOCAL_REG32(0x02A01044 /*SECRH */) = 0xFFFFFFFF; /* clear any pending secondary events */ LOCAL_REG32(0x02A01040 /*SECR */) = 0xFFFFFFFF; LOCAL_REG32(0x02A01044 /*SECRH */) = 0xFFFFFFFF; /* clear any missed EDMA events */ LOCAL_REG32(0x02A00308 /* EMCR */) = 0xFFFFFFFF; LOCAL_REG32(0x02A0030C /* EMCRH */) = 0xFFFFFFFF; /* disable EDMA interrupts */ LOCAL_REG32(0x02A01058 /* IECR */) = 0xFFFFFFFF; LOCAL_REG32(0x02A0105C /* IECRH */) = 0xFFFFFFFF; /* clear anny pending EDMA interrupts */ LOCAL_REG32(0x02A01070 /* ICR */) = 0xFFFFFFFF; LOCAL_REG32(0x02A01074 /* ICRH */) = 0xFFFFFFFF; /* clear any missed QDMA events */ LOCAL_REG32(0x02A00310 /* QEMCR */) = 0xFFFFFFFF; /* Clear any pending QDMA events */ LOCAL_REG32(0x02A01088 /* QEECR */) = 0xFFFFFFFF; /* Clear any pending QDMA secondary events */ LOCAL_REG32(0x02A01094 /* QSECR */) = 0xFFFFFFFF; /* Clear any pending errors in the EDMA3CC error register */ LOCAL_REG32(0x02A0031C /*CCERRCLR */) = 0xFFFFFFFF; /* set default channel PaRAM mapping */ for (chan=0; chan<64; chan++) { LOCAL_REG32(0x02A00200 + 4 * chan) = 0x02A04000 + 32*chan; }; /* program the region access registers for region 0 */ LOCAL_REG32(0x02A00340 /* DRAE0 */) = 0x000FFFFF; LOCAL_REG32(0x02A00344 /* DRAEH0 */) = 0x00000000; /* program the region access registers for region 1 */ LOCAL_REG32(0x02A00348 /* DRAE1 */) = 0xFFF00000; LOCAL_REG32(0x02A0034C /* DRAEH1 */) = 0x000000FF; /* program the region access registers for region 2 */ LOCAL_REG32(0x02A00350 /* DRAE2 */) = 0x00000000; LOCAL_REG32(0x02A00354 /* DRAEH2 */) = 0x0FFFFF00; /* program the region access registers for region 3 */ LOCAL_REG32(0x02A00358 /* DRAE3 */) = 0x00000000; LOCAL_REG32(0x02A0035C /* DRAEH3 */) = 0x00000000; /* program the region access registers for region 4 */ LOCAL_REG32(0x02A00360 /* DRAE4 */) = 0x00000000; LOCAL_REG32(0x02A00364 /* DRAEH4 */) = 0x00000000; /* program the region access registers for region 5 */ LOCAL_REG32(0x02A00368 /* DRAE5 */) = 0x00000000; LOCAL_REG32(0x02A0036C /* DRAEH5 */) = 0x00000000; /* program the region access registers for region 6 */ LOCAL_REG32(0x02A00370 /* DRAE6 */) = 0x00000000; LOCAL_REG32(0x02A00374 /* DRAEH6 */) = 0x00000000; /* program the region access registers for region 7 */ LOCAL_REG32(0x02A00378 /* DRAE7 */) = 0x00000000; LOCAL_REG32(0x02A0037C /* DRAEH7 */) = 0x00000000;
Regards,
RandyP