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.
HI
I am trying to use CLB1 to generate 2 square wave and connect these signal to QEP1 QA and QB input
my CLB OutPutMask is setting like this: CLB_setOutputMask(CLB1_BASE, 0x0300 , true)
,but the result is weird,any time when QEPA input keeps high ,the QEP1
will counting continuously ,can not stop, how can i fix it?
Hi Yaosheng,
Thank you for using the E2E forums. Your OutputMask function is correct for setting the outputs to QA and QB (bits 8 and 9). I suspect there maybe something wrong with the logic you are trying to implement. Could you explain your logic and signals in more detail? I found a similar problem in this post:
You may want to try this implementation if yours is not behaving as you would like.
Regards,
Peter
HI Peter
thanks for your help,i also do another test,and the setting as fallows
Tile2 output0 and output1 are set to a constant 1,then put tile2 design to clb1
and open the output mask, connect CLB output0 and output1 to QEP1 QA and QB
the result is the same,i will try some test to find the promlem
thanks
Hi Yansheng,
Thank you for your patience in resolving this issue. I reached out to the person responsible for the TRMs and they mentioned that there is indeed an error in the TRM regarding the CLB output bits. See below for the corrected CLB_OUT bits.
This information will be updated in a future release of the technical reference manual for all CLB devices, but for the time being, please refer to this. Please let me know if this resolves your issue and if there is anything else that I can assist you with.
Regards,
Peter
HI Peter
I am sorry for late reply,I follow your suggestion,connect CLB_out9 and CLB_out10 to QEP1 by setting outputmask like this
CLB_setOutputMask(CLB1_BASE, 0x0C00 , true),I also confiqure TILE2 out2 and out3 to output the Square wave but QEP1 is not countting.
Hi Yaosheng,
That is certainly peculiar. Is there any specific reason as to why you changed to TILE2 OUTPUT2 and OUTPUT3 as opposed to OUTPUT0 and OUTPUT1? To troubleshoot your issue, can you attempt to export the CLB outputs to the GPIOs using OUTPUT XBAR and verify that they are functioning as expected? If not, it may be an issue with your logic. Another solution could be to design your CLB tile as a custom quadrature decoder module, similar to what is detailed in the post I linked to you in a previous reply.
Regards,
Peter