Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

target K20D5M #135

Merged
merged 17 commits into from
Dec 26, 2013
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
K20D5M flash algo for template
  • Loading branch information
0xc0170 committed Dec 26, 2013
commit 63526032d9f1e4a646e9ba04afb043c83dab540c
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,10 @@ void i2c_init(i2c_t *obj, PinName sda, PinName scl) {
}

int i2c_start(i2c_t *obj) {
uint32_t temp;
volatile int i;
// if we are in the middle of a transaction
// activate the repeat_start flag
if (obj->i2c->S & I2C_S_BUSY_MASK) {
temp = obj->i2c->F >> 6;
obj->i2c->F &= 0x3F;
obj->i2c->C1 |= 0x04;
for (i = 0; i < 100; i ++)
__NOP();
obj->i2c->F |= temp << 6;
} else {
obj->i2c->C1 |= I2C_C1_MST_MASK;
obj->i2c->C1 |= I2C_C1_TX_MASK;
Expand Down
2 changes: 1 addition & 1 deletion workspace_tools/export/uvision4_k20d5m.uvopt.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>CMSIS_AGDI</Key>
<Name>-X"MBED CMSIS-DAP" -UA000000001 -O462 -S0 -C0 -N00("ARM CoreSight SW-DP") -D00(0BC11477) -L00(0) -FO15 -FD20000000 -FC800 -FN1 -FF0MK_P128_50MHZ -FS00 -FL20000</Name>
<Name>-X"MBED CMSIS-DAP" -UA000000001 -O462 -S0 -C0 -N00("ARM CoreSight SW-DP") -D00(0BC11477) -L00(0) -FO15 -FD20000000 -FC800 -FN1 -FF0MK_P128_50MHZ -FS00 -FL020000</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
Expand Down
4 changes: 2 additions & 2 deletions workspace_tools/export/uvision4_k20d5m.uvproj.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@
</OCR_RVCT9>
<OCR_RVCT10>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
<StartAddress>0x20000000</StartAddress>
<Size>0x2000</Size>
</OCR_RVCT10>
</OnChipMemories>
<RvctStartVector></RvctStartVector>
Expand Down