|
Hi Lumpi,
I am trying to reconfigure the io-matrix on the fly as well, starting with an SPI and a 16Bit-GPIF interface first and then switching to an 32Bit-GPIF interface. So far I have been successful to stop and restart my USB interface with respect to the first interface setup (SPI and 16Bit-GPIF). All that is computed in a seperated thread:
1. deinitializing and destroying all peripherals respectively DMA-channels
2. reinitializing and recreating according peripherals and DMA-channels
I can verify that within my control center and what's happening in there while I am restarting or reinitializing the first setup. Unfortunaetly, as soon as I try to change the io-matrix, especially calling >> CyU3PDeviceConfigureIOMatrix(io_cfg) << within my "reconfigure"-thread my interface does not come up again at all. So my question is, where exactly am I supposed to reconfigure my io-matrix and where to make the call >> CyU3PDeviceConfigureIOMatrix(io_cfg) <<.
When I got that right and with respect to the FX3 firmware api guide, after calling >>CyU3PKernelEntry()<< my threads are created and I have no chance to return to int main() where the original
call of >>CyU3PDeviceConfigureIOMatrix(io_cfg)<< is made. So how does that fit together with your last comment "The configureIoMatrix call in the main still has to stay there.".
Any advice would be highly appreciated.
Thank you very much in advance.
Christian
|