исправил баг с переключением чипселекта

This commit is contained in:
Eugene 2023-12-07 11:55:15 +03:00
parent fe2fe40ad9
commit f6852a4bec
4 changed files with 149 additions and 40 deletions

View File

@ -24,14 +24,14 @@
<mapEntry key="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser.PIN_CLONE_VIEW_2@#$Texas Instruments XDS100v2 USB Debug Probe_0/C28xx_CPU1" value="Data@@0x38000"/> <mapEntry key="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser.PIN_CLONE_VIEW_2@#$Texas Instruments XDS100v2 USB Debug Probe_0/C28xx_CPU1" value="Data@@0x38000"/>
<mapEntry key="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser.PIN_CLONE_VIEW_2@#$Texas Instruments XDS100v2 USB Debug Probe_0/C28xx_CPU2" value="Data@@0"/> <mapEntry key="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser.PIN_CLONE_VIEW_2@#$Texas Instruments XDS100v2 USB Debug Probe_0/C28xx_CPU2" value="Data@@0"/>
<mapEntry key="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser.PIN_CLONE_VIEW_2@#$Texas Instruments XDS100v2 USB Debug Probe_0/Cortex_M4_0" value="@@0x20086000"/> <mapEntry key="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser.PIN_CLONE_VIEW_2@#$Texas Instruments XDS100v2 USB Debug Probe_0/Cortex_M4_0" value="@@0x20086000"/>
<mapEntry key="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser.PIN_CLONE_VIEW_3@#$Texas Instruments XDS100v2 USB Debug Probe_0/C28xx_CPU1" value="Data@@0x80000"/> <mapEntry key="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser.PIN_CLONE_VIEW_3@#$Texas Instruments XDS100v2 USB Debug Probe_0/C28xx_CPU1" value="Data@@0x00000420"/>
<mapEntry key="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser.PIN_CLONE_VIEW_3@#$Texas Instruments XDS100v2 USB Debug Probe_0/C28xx_CPU2" value="Data@@0x80000"/> <mapEntry key="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser.PIN_CLONE_VIEW_3@#$Texas Instruments XDS100v2 USB Debug Probe_0/C28xx_CPU2" value="Data@@0x80000"/>
<mapEntry key="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser.PIN_CLONE_VIEW_3@#$Texas Instruments XDS100v2 USB Debug Probe_0/Cortex_M4_0" value="@@0x20082000"/> <mapEntry key="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser.PIN_CLONE_VIEW_3@#$Texas Instruments XDS100v2 USB Debug Probe_0/Cortex_M4_0" value="@@0x20082000"/>
<mapEntry key="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser.PIN_CLONE_VIEW_4@#$Texas Instruments XDS100v2 USB Debug Probe_0/C28xx_CPU1" value="Data@@0x38000"/> <mapEntry key="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser.PIN_CLONE_VIEW_4@#$Texas Instruments XDS100v2 USB Debug Probe_0/C28xx_CPU1" value="Data@@0x38000"/>
<mapEntry key="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser.PIN_CLONE_VIEW_5@#$Texas Instruments XDS100v2 USB Debug Probe_0/C28xx_CPU1" value="Data@@0x39000"/> <mapEntry key="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser.PIN_CLONE_VIEW_5@#$Texas Instruments XDS100v2 USB Debug Probe_0/C28xx_CPU1" value="Data@@0x39000"/>
<mapEntry key="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser@#$Texas Instruments XDS100v2 USB Debug Probe_0/C28xx_CPU1" value="Data@@0x2008000"/> <mapEntry key="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser@#$Texas Instruments XDS100v2 USB Debug Probe_0/C28xx_CPU1" value="Data@@0x20080000"/>
<mapEntry key="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser@#$Texas Instruments XDS100v2 USB Debug Probe_0/C28xx_CPU2" value="Data@@0x82000"/> <mapEntry key="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser@#$Texas Instruments XDS100v2 USB Debug Probe_0/C28xx_CPU2" value="Data@@0x82000"/>
<mapEntry key="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser@#$Texas Instruments XDS100v2 USB Debug Probe_0/Cortex_M4_0" value="@@0x20082000"/> <mapEntry key="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser@#$Texas Instruments XDS100v2 USB Debug Probe_0/Cortex_M4_0" value="@@0x20080000"/>
</mapAttribute> </mapAttribute>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_DEBUGGER_PROPERTIES.TMS320F28388D.ccxml.Texas Instruments XDS100v2 USB Debug Probe_0/C28xx_CPU1" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot; ?&gt;&#10;&lt;PropertyValues&gt;&#10;&#10; &lt;property id=&quot;ConnectOnStartup&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;EnableInstalledBreakpoint&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;IgnoreSoftLaunchFailures&quot;&gt;&#10; &lt;curValue&gt;0&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10;&lt;/PropertyValues&gt;&#10;"/> <stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_DEBUGGER_PROPERTIES.TMS320F28388D.ccxml.Texas Instruments XDS100v2 USB Debug Probe_0/C28xx_CPU1" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot; ?&gt;&#10;&lt;PropertyValues&gt;&#10;&#10; &lt;property id=&quot;ConnectOnStartup&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;EnableInstalledBreakpoint&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;IgnoreSoftLaunchFailures&quot;&gt;&#10; &lt;curValue&gt;0&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10;&lt;/PropertyValues&gt;&#10;"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_GROUP_LIST" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;groupInfoData&gt;&#13;&#10;&lt;group autoload_group=&quot;true&quot; id=&quot;Group 1&quot; sync_group=&quot;false&quot;&gt;&#13;&#10;&lt;thread id=&quot;Texas Instruments XDS100v2 USB Debug Probe_0/C28xx_CPU1&quot;/&gt;&#13;&#10;&lt;/group&gt;&#13;&#10;&lt;/groupInfoData&gt;"/> <stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_GROUP_LIST" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;groupInfoData&gt;&#13;&#10;&lt;group autoload_group=&quot;true&quot; id=&quot;Group 1&quot; sync_group=&quot;false&quot;&gt;&#13;&#10;&lt;thread id=&quot;Texas Instruments XDS100v2 USB Debug Probe_0/C28xx_CPU1&quot;/&gt;&#13;&#10;&lt;/group&gt;&#13;&#10;&lt;/groupInfoData&gt;"/>

View File

@ -122,6 +122,7 @@ uint16_t Bl25cm1a_verify_8_bytes(uint32_t Addr, uint16_t * verify_data, uint16_
{ {
volatile uint16_t empty, i, j; volatile uint16_t empty, i, j;
uint16_t Stat = 1; uint16_t Stat = 1;
uint16_t Err = 0;
Stat = Bl25cm1a_ReadStatus(); Stat = Bl25cm1a_ReadStatus();
while((Stat&0x1) != 0 ) while((Stat&0x1) != 0 )
@ -145,9 +146,9 @@ uint16_t Bl25cm1a_verify_8_bytes(uint32_t Addr, uint16_t * verify_data, uint16_
empty = SpiRegs.SPIRXBUF; empty = SpiRegs.SPIRXBUF;
for(j = 0; j<num_byte; j++) for(j = 0; j<num_byte; j++)
{ {
if(verify_data[j] != SpiRegs.SPIRXBUF) return 1; if(verify_data[j] != SpiRegs.SPIRXBUF) Err++;
} }
return 0; return Err;
} }
void Bl25cm1a_read_data(uint32_t Addr, uint16_t quant8, uint16_t * read_data) void Bl25cm1a_read_data(uint32_t Addr, uint16_t quant8, uint16_t * read_data)

View File

@ -124,18 +124,24 @@ void SpiAGpioInit(void)
void spi_TurnOnCS1_GD25Q16E(void) void spi_TurnOnCS1_GD25Q16E(void)
{ {
EALLOW;
GpioCtrlRegs.GPBMUX1.bit.GPIO35 = 3; // Configure GPIO35 as SPISTEA GpioCtrlRegs.GPBMUX1.bit.GPIO35 = 3; // Configure GPIO35 as SPISTEA
EDIS;
} }
void spi_TurnOffCS1_GD25Q16E(void) void spi_TurnOffCS1_GD25Q16E(void)
{ {
EALLOW;
GpioCtrlRegs.GPBMUX1.bit.GPIO35 = 0; GpioCtrlRegs.GPBMUX1.bit.GPIO35 = 0;
GpioDataRegs.GPBDAT.bit.GPIO35 = 1; GpioDataRegs.GPBDAT.bit.GPIO35 = 1;
EDIS;
} }
void Gpio15outSPI_CS_BL25CM1A(uint16_t out_bit) void Gpio15outSPI_CS_BL25CM1A(uint16_t out_bit)
{ {
GpioDataRegs.GPADAT.bit.GPIO15 = out_bit; EALLOW;
GpioDataRegs.GPADAT.bit.GPIO15 = out_bit;
EDIS;
} }

View File

@ -17,6 +17,9 @@
<configuration XML_version="1.2" id="Texas Instruments XDS100v2 USB Debug Probe_0"> <configuration XML_version="1.2" id="Texas Instruments XDS100v2 USB Debug Probe_0">
@ -37,6 +40,9 @@
<instance XML_version="1.2" desc="Texas Instruments XDS100v2 USB Debug Probe_0" href="connections/TIXDS100v2_Connection.xml" id="Texas Instruments XDS100v2 USB Debug Probe_0" xml="TIXDS100v2_Connection.xml" xmlpath="connections"/> <instance XML_version="1.2" desc="Texas Instruments XDS100v2 USB Debug Probe_0" href="connections/TIXDS100v2_Connection.xml" id="Texas Instruments XDS100v2 USB Debug Probe_0" xml="TIXDS100v2_Connection.xml" xmlpath="connections"/>
@ -57,6 +63,9 @@
<connection XML_version="1.2" id="Texas Instruments XDS100v2 USB Debug Probe_0"> <connection XML_version="1.2" id="Texas Instruments XDS100v2 USB Debug Probe_0">
@ -78,6 +87,9 @@
<instance XML_version="1.2" href="drivers/tixds100v2icepick_c.xml" id="drivers" xml="tixds100v2icepick_c.xml" xmlpath="drivers"/> <instance XML_version="1.2" href="drivers/tixds100v2icepick_c.xml" id="drivers" xml="tixds100v2icepick_c.xml" xmlpath="drivers"/>
@ -98,6 +110,9 @@
<instance XML_version="1.2" href="drivers/tixds100v2c28x.xml" id="drivers" xml="tixds100v2c28x.xml" xmlpath="drivers"/> <instance XML_version="1.2" href="drivers/tixds100v2c28x.xml" id="drivers" xml="tixds100v2c28x.xml" xmlpath="drivers"/>
@ -118,6 +133,9 @@
<instance XML_version="1.2" href="drivers/tixds100v2cla2.xml" id="drivers" xml="tixds100v2cla2.xml" xmlpath="drivers"/> <instance XML_version="1.2" href="drivers/tixds100v2cla2.xml" id="drivers" xml="tixds100v2cla2.xml" xmlpath="drivers"/>
@ -138,6 +156,9 @@
<instance XML_version="1.2" href="drivers/tixds100v2cs_child.xml" id="drivers" xml="tixds100v2cs_child.xml" xmlpath="drivers"/> <instance XML_version="1.2" href="drivers/tixds100v2cs_child.xml" id="drivers" xml="tixds100v2cs_child.xml" xmlpath="drivers"/>
@ -158,6 +179,9 @@
<instance XML_version="1.2" href="drivers/tixds100v2cs_dap.xml" id="drivers" xml="tixds100v2cs_dap.xml" xmlpath="drivers"/> <instance XML_version="1.2" href="drivers/tixds100v2cs_dap.xml" id="drivers" xml="tixds100v2cs_dap.xml" xmlpath="drivers"/>
@ -178,6 +202,9 @@
<instance XML_version="1.2" href="drivers/tixds100v2cortexM.xml" id="drivers" xml="tixds100v2cortexM.xml" xmlpath="drivers"/> <instance XML_version="1.2" href="drivers/tixds100v2cortexM.xml" id="drivers" xml="tixds100v2cortexM.xml" xmlpath="drivers"/>
@ -198,6 +225,9 @@
<instance XML_version="1.2" href="drivers/tixds510ajsm.xml" id="drivers" xml="tixds510ajsm.xml" xmlpath="drivers"/> <instance XML_version="1.2" href="drivers/tixds510ajsm.xml" id="drivers" xml="tixds510ajsm.xml" xmlpath="drivers"/>
@ -218,6 +248,9 @@
<platform XML_version="1.2" id="platform_0"> <platform XML_version="1.2" id="platform_0">
@ -238,6 +271,9 @@
<instance XML_version="1.2" desc="TMS320F28388D_0" href="devices/f28388d.xml" id="TMS320F28388D_0" xml="f28388d.xml" xmlpath="devices"/> <instance XML_version="1.2" desc="TMS320F28388D_0" href="devices/f28388d.xml" id="TMS320F28388D_0" xml="f28388d.xml" xmlpath="devices"/>
@ -258,6 +294,9 @@
<device HW_revision="1" XML_version="1.2" description="" id="TMS320F28388D_0" partnum="TMS320F28388D" simulation="no"> <device HW_revision="1" XML_version="1.2" description="" id="TMS320F28388D_0" partnum="TMS320F28388D" simulation="no">
@ -278,6 +317,9 @@
<router HW_revision="1.0" XML_version="1.2" description="ICEPick_C router" id="IcePick_C_0" isa="ICEPICK_C"> <router HW_revision="1.0" XML_version="1.2" description="ICEPick_C router" id="IcePick_C_0" isa="ICEPICK_C">
@ -298,6 +340,9 @@
<subpath id="Subpath_1"> <subpath id="Subpath_1">
@ -318,6 +363,9 @@
<property Type="numericfield" Value="0x11" desc="Port Number_0" id="Port Number"/> <property Type="numericfield" Value="0x11" desc="Port Number_0" id="Port Number"/>
@ -338,6 +386,9 @@
</subpath> </subpath>
@ -358,6 +409,9 @@
<subpath id="CM"> <subpath id="CM">
@ -378,6 +432,9 @@
<property Type="numericfield" Value="0x12" desc="Port Number_1" id="Port Number"/> <property Type="numericfield" Value="0x12" desc="Port Number_1" id="Port Number"/>
@ -398,6 +455,9 @@
</subpath> </subpath>
@ -418,6 +478,9 @@
<subpath id="Subpath_3"> <subpath id="Subpath_3">
@ -438,6 +501,9 @@
<cpu HW_revision="1.0" XML_version="1.2" description="JLM" deviceSim="false" id="JLM" isa="AJSM"> <cpu HW_revision="1.0" XML_version="1.2" description="JLM" deviceSim="false" id="JLM" isa="AJSM">
@ -458,6 +524,9 @@
<property Type="numericfield" Value="0x0" id="Unlock Key bits 31:00"/> <property Type="numericfield" Value="0x0" id="Unlock Key bits 31:00"/>
@ -478,6 +547,9 @@
<property Type="numericfield" Value="0x0" id="Unlock Key bits 63:32"/> <property Type="numericfield" Value="0x0" id="Unlock Key bits 63:32"/>
@ -498,6 +570,9 @@
<property Type="numericfield" Value="0x0" id="Unlock Key bits 95:64"/> <property Type="numericfield" Value="0x0" id="Unlock Key bits 95:64"/>
@ -518,6 +593,9 @@
<property Type="numericfield" Value="0x0" id="Unlock Key bits 127:96"/> <property Type="numericfield" Value="0x0" id="Unlock Key bits 127:96"/>
@ -538,6 +616,9 @@
</cpu> </cpu>
@ -558,6 +639,9 @@
</subpath> </subpath>
@ -578,6 +662,9 @@
</router> </router>
@ -598,6 +685,9 @@
</device> </device>
@ -618,6 +708,9 @@
</platform> </platform>
@ -638,6 +731,9 @@
</connection> </connection>
@ -657,6 +753,9 @@
</configuration> </configuration>
@ -677,6 +776,9 @@
</configurations> </configurations>