This is a large paperback book that for the most part is quite informative and has a lot of helpful detail.
But I'm exploring DMA and found what look like a misprint or coding error - Page 353.
In the function DMA1_Stream6_setup is the statement:
DMA1->HIFCR = 0x003F0000; /* clear all interrupt flags of stream 6. */
This code is writing a '1' to bits 16 thru 21 inclusive - 6 bits.
However the same book on Page 350 details each bit in the HIFCR register and calls out that bit 17 (and others) are reserved and must be kept at reset value.
This means that instead that assignment should be:
DMA1->HIFCR = 0x003D0000; /* clear all interrupt flags of stream 6. */
That assignment does not write a '1' to bit 17.
Is this correct reasoning or am I missing something?
Thanks
But I'm exploring DMA and found what look like a misprint or coding error - Page 353.
In the function DMA1_Stream6_setup is the statement:
DMA1->HIFCR = 0x003F0000; /* clear all interrupt flags of stream 6. */
This code is writing a '1' to bits 16 thru 21 inclusive - 6 bits.
However the same book on Page 350 details each bit in the HIFCR register and calls out that bit 17 (and others) are reserved and must be kept at reset value.
This means that instead that assignment should be:
DMA1->HIFCR = 0x003D0000; /* clear all interrupt flags of stream 6. */
That assignment does not write a '1' to bit 17.
Is this correct reasoning or am I missing something?
Thanks