Enabling the HET2 driver but not the HET1 HalCoGen generates and incomplete het.c code.
In attachment there's the generated het.c code and the corresponding .hcj file.
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.
Enabling the HET2 driver but not the HET1 HalCoGen generates and incomplete het.c code.
In attachment there's the generated het.c code and the corresponding .hcj file.
I've tried to workaround the problem enabling in halcogen only the HET1 driver, performing my HET settings and changing in the generated code all the reference to het:_RAM1 in hetRAM2 and het_REG1 to het_REG2.
Doing this the HET2 works as expected so halcogen has surely a bug with HET2 code generation.
I hope this bug will be solved in the next HalCoGen release.
Anyway I'm going to dig the problem to locate the exact problem in the generated HET2 code.
I have identified the problem: when both HET1 and HET2 are enabled HalCoGen set them both to slave mode (bit 16 of GCR register set to 0). In this way none of them works. If I manually set the GCR value to 0x01030001, for one or both HET, all works properly as expected because at least one of the HET must be master.
I summarize to be more clear. The problems are two distinct:
- enabling only HET2 driver HalCoGen generates incomplete het.c file (attached in previous post)
- enabling both HETs none of them works because HalCoGen configures both in slave mode
Both problems can be solved modifing properly the het.c code.