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.
Tool/software: Code Composer Studio
Hello,
I have a question regarding the PCNT instruction which can be used to measure the counts between rising edges (RISE2RISE, etc). For me it is clear how to interpret the data or how to catch it vial the application from the host side, but is there any mechanism in order to have valid data only at the end of the measured period which can be accessed by the host cpu because the host cpu could easily read the data field of the PCNT instruction at any time while the counting is still ongoing. In other words, the read data by the host cpu is invalid then.
SInce an event of a rising edge to another rising edge can be seen as one complete period, my solution is to add an additional branch instruction (BR) after the PCNT instruction which will conditionally jump to the next location when a "RISE" event occurred. After that I have to abuse the MOV32 instruction in order to load from the remote data field (which is in this case the PCNT instruction to get a valid value after one period) to a register and then to move that data content to another dummy remote instruction with another MOV32 instruction which will hold the valid data.
I would like to know whether another approach exist or you could provide some further feedback. I am a little bit scared about the loop resolution as well as the time slots as the MOV32 instructions can eat up to 2 cycles and we are talking right now just about one PCNT instruction. I could also imagine that I am interested to have valid data from a PCNT rising edge to falling edge.
See question above as I am facing sometimes the problem that different paths based on the conditional jump adress are performed and I am actually able to see data on the Het RAM where it should not be the case because the specific path should not be executed. I have performed several tests with the HET IDE, but I have the impression when directly manipulating the address on the RM48 target in order to modify the program flow of the het program, then I can see some leakage / inconsistencies regarding data read on the pin. For example there could be a conditional jump just to measure the period or to count the falling edges. It is not needed to perform both actions at the same time. So there will be a input in the main.c in order to change the conditional jump adress (e.g. Control field). When doing so, there is a small amount of time where I can see activities on both het program paths although only one should be activated on the target when looking into the Het RAM data adressess