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.
The User Manual only shows word length .W or byte length .B read/write examples to MPY32 registers but forgets to make a mention whether .A 20 bit access is prohibited or not. The general description of peripherals also makes no mentions of a limitation. I would try instead of asking but do not have a board now. MOVA to/from MPY32 regs would be benificial if doing 20 bit ALU type optimization since 20 bit addition and subtraction instructions do exist : ADDA and SUBA.
thank you for that, zrno soli. Yes, i found the corresponding section in the manual : It says that an address word length .A write from a register to memory will delete bits 15:4 at memory +2 but makes no mention of the same if the source is not a register (any non-register addressing mode as source) for example with a symbolic source :
MOVX.A EDE , &MPY32L
but it is likely to delete those bits too. Closing that parenthesis back to trying to use MPY32 with 20 bits operands, using a register source.
MOVA Rsc , &MPY32L
This single instruction would have written 32 bits including 16 bits at &MPY32L, 8 bits = { 0000 xxxx} at &MPY32L+2=MPY32H_B and cleared 4 bits at &MPY32L+3=MPY32H_H. How will the MPY32 controller behave for operand 1 is uncertain. It might assume operand 1 is 16,24 or 32 bits, the latter two would be fine only as long as it's not 16. But my guess is it will assume 16 bits, if so it would not work.
Howard Handsum said:thank you for that, zrno soli. Yes, i found the corresponding section in the manual : It says that an address word length .A write from a register to memory will delete bits 15:4 at memory +2 but makes no mention of the same if the source is not a register...
20 bits will be transferred, other bits will be cleared, for any source / destination type.
**Attention** This is a public forum