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

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_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_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/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_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/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>
<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;"/>

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;
uint16_t Stat = 1;
uint16_t Err = 0;
Stat = Bl25cm1a_ReadStatus();
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;
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)

View File

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

View File

@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<configurations XML_version="1.2" id="configurations_0">
@ -20,7 +23,10 @@
<configuration XML_version="1.2" id="Texas Instruments XDS100v2 USB Debug Probe_0">
@ -40,7 +46,10 @@
<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"/>
@ -60,7 +69,10 @@
<connection XML_version="1.2" id="Texas Instruments XDS100v2 USB Debug Probe_0">
@ -80,7 +92,10 @@
<instance XML_version="1.2" href="drivers/tixds100v2icepick_c.xml" id="drivers" xml="tixds100v2icepick_c.xml" xmlpath="drivers"/>
@ -100,7 +115,10 @@
<instance XML_version="1.2" href="drivers/tixds100v2c28x.xml" id="drivers" xml="tixds100v2c28x.xml" xmlpath="drivers"/>
@ -120,7 +138,10 @@
<instance XML_version="1.2" href="drivers/tixds100v2cla2.xml" id="drivers" xml="tixds100v2cla2.xml" xmlpath="drivers"/>
@ -140,7 +161,10 @@
<instance XML_version="1.2" href="drivers/tixds100v2cs_child.xml" id="drivers" xml="tixds100v2cs_child.xml" xmlpath="drivers"/>
@ -160,7 +184,10 @@
<instance XML_version="1.2" href="drivers/tixds100v2cs_dap.xml" id="drivers" xml="tixds100v2cs_dap.xml" xmlpath="drivers"/>
@ -180,7 +207,10 @@
<instance XML_version="1.2" href="drivers/tixds100v2cortexM.xml" id="drivers" xml="tixds100v2cortexM.xml" xmlpath="drivers"/>
@ -200,7 +230,10 @@
<instance XML_version="1.2" href="drivers/tixds510ajsm.xml" id="drivers" xml="tixds510ajsm.xml" xmlpath="drivers"/>
@ -220,7 +253,10 @@
<platform XML_version="1.2" id="platform_0">
@ -240,7 +276,10 @@
<instance XML_version="1.2" desc="TMS320F28388D_0" href="devices/f28388d.xml" id="TMS320F28388D_0" xml="f28388d.xml" xmlpath="devices"/>
@ -260,7 +299,10 @@
<device HW_revision="1" XML_version="1.2" description="" id="TMS320F28388D_0" partnum="TMS320F28388D" simulation="no">
@ -280,7 +322,10 @@
<router HW_revision="1.0" XML_version="1.2" description="ICEPick_C router" id="IcePick_C_0" isa="ICEPICK_C">
@ -300,7 +345,10 @@
<subpath id="Subpath_1">
@ -320,7 +368,10 @@
<property Type="numericfield" Value="0x11" desc="Port Number_0" id="Port Number"/>
@ -340,7 +391,10 @@
</subpath>
@ -360,7 +414,10 @@
<subpath id="CM">
@ -380,7 +437,10 @@
<property Type="numericfield" Value="0x12" desc="Port Number_1" id="Port Number"/>
@ -400,7 +460,10 @@
</subpath>
@ -420,7 +483,10 @@
<subpath id="Subpath_3">
@ -440,7 +506,10 @@
<cpu HW_revision="1.0" XML_version="1.2" description="JLM" deviceSim="false" id="JLM" isa="AJSM">
@ -460,7 +529,10 @@
<property Type="numericfield" Value="0x0" id="Unlock Key bits 31:00"/>
@ -480,7 +552,10 @@
<property Type="numericfield" Value="0x0" id="Unlock Key bits 63:32"/>
@ -500,7 +575,10 @@
<property Type="numericfield" Value="0x0" id="Unlock Key bits 95:64"/>
@ -520,7 +598,10 @@
<property Type="numericfield" Value="0x0" id="Unlock Key bits 127:96"/>
@ -540,7 +621,10 @@
</cpu>
@ -560,7 +644,10 @@
</subpath>
@ -580,7 +667,10 @@
</router>
@ -600,7 +690,10 @@
</device>
@ -620,7 +713,10 @@
</platform>
@ -640,7 +736,10 @@
</connection>
@ -660,7 +759,10 @@
</configuration>