bl_iot_sdk icon indicating copy to clipboard operation
bl_iot_sdk copied to clipboard

Incorrect AON offset in SVD file?

Open Yangff opened this issue 2 years ago • 0 comments

https://raw.githubusercontent.com/bouffalolab/bl_iot_sdk/master/components/bl602/bl602_std/bl602_std/Device/Bouffalo/BL602/Peripherals/soc602_reg.svd

Here the peripheral AON has a baseAddress of 0x4000F800, but all registers in this section has an offset of 0x800. I think his offset is redundant as the 0x800 is already added in its base address. Another proof is bl602.h, where AON_BASE is set to 0x4000F000 and the offsets in aon_reg.h has an offset of 0x8XX based on this base address.

			<peripheral>
				<name>AON</name>
				<description>AON.</description>
				<baseAddress>0x4000F800</baseAddress>
				<groupName>AON</groupName>
				<size>32</size>
				<access>read-write</access>
				<addressBlock>
					<offset>0</offset>
					<size>0x1000</size>
					<usage>registers</usage>
				</addressBlock>
				<registers>
					<register>
						<name>aon</name>
						<description>aon.</description>
						<addressOffset>0x800</addressOffset>
						<fields>
							<field>
								<name>sw_pu_ldo11_rt</name>
								<lsb>22</lsb>
								<msb>22</msb>
							</field>
							<field>
								<name>ldo11_rt_pulldown_sel</name>
								<lsb>21</lsb>
								<msb>21</msb>
							</field>
							<field>
								<name>ldo11_rt_pulldown</name>
								<lsb>20</lsb>
								<msb>20</msb>
							</field>
							<field>
								<name>pu_aon_dc_tbuf</name>
								<lsb>12</lsb>
								<msb>12</msb>
							</field>

Yangff avatar Jul 25 '21 03:07 Yangff