Hi to all,
I'm working on a linux system running on a board based on imx6q dual.
I need to put some wait states in my SPI communication. From datasheet I read that for do this I have to write in to the ECSPIx_PERIODREG register.
Below the code that I added at the end on mx51_ecspi_config functio on spi-imx.c:
period = readl(spi_imx->base + MX51_ECSPI_PERIOD);
period = 0x800F;
printk("period %x\n",period);
writel(period, spi_imx->base + MX51_ECSPI_PERIOD);
period = readl(spi_imx->base + MX51_ECSPI_PERIOD);
printk("period %x\n",period);
Also if the written value is right no wait states between words appears...
Where I have wrong ?
Many thanks
Hi Hill
what bsp used in the case, may be recommended to try with latest nxp release :
https://source.codeaurora.org/external/imx/linux-imx/tree/?h=lf-5.10.y
https://source.codeaurora.org/external/imx/imx-test/tree/test/mxc_spi_test?h=lf-5.10.y_1.0.0
Documentation :
Best regards
igor
I made a mistake...
my code is :
period = readl(spi_imx->base + MX51_ECSPI_PERIOD);
period = 0x16;
printk("period %x\n",period);
writel(period, spi_imx->base + MX51_ECSPI_PERIOD);
period = readl(spi_imx->base + MX51_ECSPI_PERIOD);
printk("period %x\n",period);