Skip to content

Commit e728737

Browse files
authored
Merge pull request ARMmbed#90 from linlingao/enable_rtc
Added RTC, redefined system reset function, added config files to all…
2 parents fb965b3 + ba54aa5 commit e728737

File tree

7 files changed

+51
-36
lines changed

7 files changed

+51
-36
lines changed

TESTS/network/interface/mbed_app.json

Lines changed: 0 additions & 33 deletions
This file was deleted.

targets/TARGET_TI/TARGET_CC32XX/TARGET_CC3220SF/device/system_CC3220SF.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,19 @@ extern void SystemInit (void);
5050
*/
5151
extern void SystemCoreClockUpdate (void);
5252

53+
extern void PRCMMCUReset(unsigned char bIncludeSubsystem);
54+
/**
55+
\brief System Reset
56+
\details Initiates a system reset request to reset the MCU.
57+
*/
58+
__NO_RETURN __STATIC_INLINE void __CC3200_SystemReset(void)
59+
{
60+
PRCMMCUReset(0);
61+
}
62+
#ifdef NVIC_SystemReset
63+
#undef NVIC_SystemReset
64+
#endif
65+
#define NVIC_SystemReset __CC3200_SystemReset
5366

5467
#ifdef __cplusplus
5568
}

targets/TARGET_TI/TARGET_CC32XX/TARGET_CC3220SF/flash_api.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,14 @@ int32_t flash_program_page(flash_t *obj, uint32_t address, const uint8_t *data,
5050

5151
uint32_t flash_get_sector_size(const flash_t *obj, uint32_t address)
5252
{
53-
return CC3200_FLASH_SECTOR_SIZE;
53+
if ((address >= CC3200_FLASH_START_ADDRESS) && address < (CC3200_FLASH_START_ADDRESS + CC3200_FLASH_SIZE))
54+
{
55+
return CC3200_FLASH_SECTOR_SIZE;
56+
}
57+
else
58+
{
59+
return MBED_FLASH_INVALID_SIZE;
60+
}
5461
}
5562

5663
uint32_t flash_get_page_size(const flash_t *obj)

targets/targets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7615,7 +7615,7 @@
76157615
"inherits": ["CC32XX"],
76167616
"macros": ["MBED_MPU_CUSTOM"],
76177617
"components": ["SD"],
7618-
"device_has": ["USTICKER", "SERIAL", "SERIAL_FC", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "INTERRUPTIN", "SPI", "ANALOGIN", "FLASH", "TRNG"],
7618+
"device_has": ["USTICKER", "SERIAL", "SERIAL_FC", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "INTERRUPTIN", "SPI", "ANALOGIN", "FLASH", "TRNG", "RTC"],
76197619
"core": "Cortex-M4",
76207620
"bootloader_supported": true,
76217621
"device_name": "CC3220SF"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"config": {
3+
"echo-server-addr" : {
4+
"help" : "IP address of echo server",
5+
"value" : "\"echo.mbedcloudtesting.com\""
6+
},
7+
"echo-server-port" : {
8+
"help" : "Port of echo server",
9+
"value" : "7"
10+
}
11+
},
12+
"target_overrides": {
13+
"*": {
14+
"target.features_add" : ["STORAGE"],
15+
"target.components_add" : ["SD"],
16+
"target.network-default-interface-type": "WIFI",
17+
"nsapi.default-wifi-security" : "WPA_WPA2",
18+
"nsapi.default-wifi-ssid" : "\"SSID\"",
19+
"nsapi.default-wifi-password" : "\"PASSWORD\""
20+
}
21+
}
22+
}

tools/test_configs/config_paths.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
"THREAD_END_DEVICE" : "ThreadInterface_end_device.json",
1515
"THREAD_ROUTER" : "ThreadInterface_router.json",
1616
"NO_NETWORK": "no_network.json",
17-
"NANOSTACK_MAC_TESTER": "NanostackMACTester.json"
17+
"NANOSTACK_MAC_TESTER": "NanostackMACTester.json",
18+
"CC3220SF_WIFI": "CC3220SFInterface.json"
1819
}

tools/test_configs/target_configs.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,10 @@
6262
"TB_SENSE_1": {
6363
"default_test_configuration": "NO_NETWORK",
6464
"test_configurations": ["6LOWPAN_HOST", "6LOWPAN_ROUTER", "THREAD_END_DEVICE", "THREAD_ROUTER"]
65+
},
66+
"CC3220SF": {
67+
"nsapi.socket-stats-enable": true,
68+
"default_test_configuration": "CC3220SF_WIFI",
69+
"test_configurations": ["CC3220SF_WIFI"]
6570
}
6671
}

0 commit comments

Comments
 (0)