2020-02-26 09:05 AM
How do I initialise it? Do I need to swith on an internal peripheral Bus?
2020-02-27 01:06 AM
not an answer but for more info. All the registers, in the debugger contain 0x50. But writing or reading from them seems to make no difference.
2020-02-27 06:03 AM
Mysteriously this morning the gui changed and I now have all the HAL libraries!
2020-02-27 09:16 AM
CORDICsConfig.Function = CORDIC_FUNCTION_COSINE; // Needs M and theta of M.Sin(theta)
CORDICsConfig.Scale = 0;// CORDIC_CSR_SCALE_0 == Q1.32 or B1 making this 0 makes it B0 as it should be
CORDICsConfig.NbWrite = CORDIC_NBWRITE_2;
CORDICsConfig.NbRead = CORDIC_NBREAD_2;
CORDICsConfig.InSize = CORDIC_INSIZE_32BITS;
CORDICsConfig.OutSize = CORDIC_INSIZE_32BITS;
CORDICsConfig.Precision = CORDIC_PRECISION_15CYCLES;
HAL_CORDIC_Configure(&hcordic, &CORDICsConfig);
This seems to work fine for sines and cosines and atan2 (called modulus)
However, the CORDIC_CSR_SCALE_0 (I think) should be named CORDIC_CSR_SCALE_1
To get this working I had to force a zero in.
With CORDIC_CSR_SCALE_0 I get what I would expect would be B1 scaling.