diff --git a/features/FEATURE_BLE/targets/TARGET_Cypress/COMPONENT_CYW43XXX/firmware/COMPONENT_43438/w_bt_firmware_controller.c b/features/FEATURE_BLE/targets/TARGET_Cypress/COMPONENT_CYW43XXX/firmware/COMPONENT_43438/w_bt_firmware_controller.c new file mode 100644 index 00000000000..eff0c1f99ff --- /dev/null +++ b/features/FEATURE_BLE/targets/TARGET_Cypress/COMPONENT_CYW43XXX/firmware/COMPONENT_43438/w_bt_firmware_controller.c @@ -0,0 +1,2142 @@ +#include + +/* labelling: appname-(chipname)(stepping)-frequency-(headset GIT SHA)-(generating SDK version)- + * Wiced-release.hcd */ +const char brcm_patch_version[] = "BCM4343A1_001.002.009.0099.0000_Generic_UART_26MHz_wlbga_wiced"; +const uint8_t brcm_patchram_format = 0x01; +/* Configuration Data Records (Write_RAM) */ +const unsigned char brcm_patchram_buf[36149] = { + 76, 252, 70, 16, 24, 33, 0, 66, 82, 67, 77, 99, 102, 103, 83, 0, 0, + 0, 0, 50, 0, 0, 0, 1, 1, 4, 144, 101, 0, 0, 0, 3, 6, 172, 31, 18, 161, + 67, 67, 0, 1, 28, 82, 24, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 0, 0, 76, 252, 255, 82, 24, + 33, 0, 66, 82, 67, 77, 99, 102, 103, 68, 0, 0, 0, 0, 1, 137, 0, 0, 3, + 3, 38, 66, 67, 77, 52, 51, 52, 51, 65, 49, 32, 85, 65, 82, 84, 32, 50, + 54, 32, 77, 72, 122, 32, 119, 108, 98, 103, 97, 95, 114, 101, 102, 32, + 119, 105, 99, 101, 100, 0, 22, 3, 2, 99, 0, 2, 1, 248, 3, 8, 1, 50, + 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 50, 0, 255, 15, 0, 0, 98, 8, 0, 0, + 112, 0, 100, 0, 128, 0, 0, 0, 128, 0, 0, 0, 172, 0, 50, 0, 255, 255, + 255, 1, 0, 0, 47, 0, 140, 0, 50, 0, 0, 240, 255, 15, 0, 16, 17, 1, 120, + 0, 50, 0, 255, 255, 255, 255, 185, 184, 184, 184, 96, 44, 32, 0, 255, + 0, 0, 0, 0, 0, 0, 0, 16, 1, 50, 0, 0, 0, 255, 255, 0, 0, 24, 24, 108, + 1, 96, 0, 255, 255, 255, 255, 11, 0, 0, 0, 112, 1, 96, 0, 255, 255, + 255, 255, 16, 0, 0, 0, 116, 1, 96, 0, 255, 255, 255, 255, 21, 0, 0, + 0, 120, 1, 96, 0, 255, 255, 255, 255, 25, 0, 0, 0, 124, 1, 96, 0, 255, + 255, 0, 0, 29, 0, 0, 0, 132, 1, 96, 0, 255, 255, 255, 255, 33, 0, 0, + 0, 96, 6, 65, 0, 255, 255, 0, 0, 51, 3, 0, 0, 100, 6, 65, 0, 255, 76, + 252, 255, 77, 25, 33, 0, 255, 0, 0, 41, 58, 0, 0, 100, 6, 65, 0, 255, + 255, 0, 0, 41, 58, 0, 0, 104, 6, 65, 0, 255, 255, 0, 0, 104, 5, 0, 0, + 108, 6, 65, 0, 255, 255, 0, 0, 168, 48, 0, 0, 112, 6, 65, 0, 255, 255, + 0, 0, 232, 62, 0, 0, 116, 6, 65, 0, 255, 255, 0, 0, 28, 50, 0, 0, 120, + 6, 65, 0, 255, 255, 0, 0, 187, 51, 0, 0, 124, 6, 65, 0, 255, 255, 0, + 0, 48, 9, 0, 0, 80, 3, 65, 0, 255, 255, 0, 0, 16, 5, 0, 0, 84, 3, 65, + 0, 255, 255, 0, 0, 9, 9, 0, 0, 92, 3, 65, 0, 255, 255, 0, 0, 9, 8, 0, + 0, 96, 3, 65, 0, 255, 255, 0, 0, 15, 7, 0, 0, 100, 3, 65, 0, 255, 255, + 0, 0, 5, 8, 0, 0, 108, 3, 65, 0, 255, 255, 0, 0, 14, 9, 0, 0, 116, 3, + 65, 0, 255, 255, 0, 0, 5, 9, 0, 0, 120, 3, 65, 0, 255, 255, 0, 0, 16, + 10, 0, 0, 64, 1, 65, 0, 255, 255, 0, 0, 16, 5, 0, 0, 68, 1, 65, 0, 255, + 255, 0, 0, 9, 9, 0, 0, 76, 1, 65, 0, 255, 255, 0, 0, 9, 8, 0, 0, 80, + 1, 65, 0, 255, 255, 0, 0, 15, 7, 0, 0, 84, 1, 65, 0, 255, 255, 0, 0, + 5, 8, 0, 0, 92, 1, 65, 0, 76, 252, 255, 72, 26, 33, 0, 255, 255, 0, + 0, 14, 9, 0, 0, 96, 1, 65, 0, 255, 255, 0, 0, 5, 9, 0, 0, 100, 1, 65, + 0, 255, 255, 0, 0, 16, 10, 0, 0, 224, 6, 65, 0, 255, 255, 0, 0, 113, + 32, 0, 0, 156, 1, 96, 0, 255, 0, 0, 0, 3, 0, 0, 0, 100, 1, 96, 0, 255, + 255, 255, 255, 0, 0, 0, 0, 9, 1, 4, 2, 1, 0, 0, 34, 3, 2, 1, 0, 240, + 1, 40, 4, 0, 0, 0, 32, 21, 50, 0, 255, 255, 250, 255, 217, 3, 62, 254, + 40, 21, 50, 0, 0, 0, 127, 254, 52, 16, 40, 2, 44, 9, 100, 0, 14, 0, + 0, 0, 12, 0, 0, 0, 240, 1, 40, 1, 0, 0, 0, 32, 21, 50, 0, 255, 255, + 250, 255, 221, 3, 62, 254, 40, 21, 50, 0, 0, 0, 127, 254, 52, 16, 40, + 2, 44, 9, 100, 0, 14, 0, 0, 0, 12, 0, 0, 0, 240, 1, 40, 2, 0, 0, 0, + 32, 21, 50, 0, 255, 255, 250, 255, 217, 3, 62, 254, 40, 21, 50, 0, 0, + 0, 127, 254, 52, 16, 40, 2, 44, 9, 100, 0, 14, 0, 0, 0, 12, 0, 0, 0, + 240, 1, 160, 1, 3, 0, 0, 0, 16, 21, 50, 0, 0, 0, 0, 0, 240, 240, 240, + 0, 20, 21, 50, 0, 0, 0, 0, 0, 240, 240, 240, 0, 24, 21, 50, 0, 0, 0, + 0, 0, 240, 240, 76, 252, 255, 67, 27, 33, 0, 240, 0, 28, 21, 50, 0, + 0, 0, 0, 0, 76, 76, 0, 0, 32, 21, 50, 0, 255, 255, 250, 255, 221, 3, + 62, 254, 36, 21, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 21, 50, 0, 0, 0, + 127, 254, 52, 16, 40, 2, 52, 21, 50, 0, 0, 0, 0, 0, 240, 0, 0, 0, 56, + 21, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 21, 50, 0, 0, 0, 0, 0, 202, 6, + 0, 0, 44, 9, 100, 0, 14, 0, 0, 0, 12, 0, 0, 0, 248, 0, 100, 0, 81, 0, + 0, 0, 16, 0, 0, 0, 120, 8, 100, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 7, 181, + 3, 4, 6, 10, 35, 60, 90, 110, 125, 5, 56, 4, 136, 4, 156, 4, 136, 4, + 216, 4, 116, 4, 196, 4, 216, 4, 196, 4, 20, 5, 176, 4, 0, 5, 20, 5, + 0, 5, 80, 5, 246, 4, 70, 5, 90, 5, 70, 5, 150, 5, 60, 5, 140, 5, 160, + 5, 140, 5, 220, 5, 130, 5, 210, 5, 230, 5, 210, 5, 34, 6, 20, 255, 20, + 255, 20, 255, 20, 255, 20, 255, 20, 255, 168, 2, 168, 2, 168, 2, 168, + 2, 168, 2, 228, 2, 228, 2, 228, 2, 228, 2, 228, 2, 32, 3, 32, 3, 32, + 3, 32, 3, 32, 3, 102, 3, 102, 3, 102, 3, 102, 3, 102, 3, 172, 3, 172, + 3, 76, 252, 255, 62, 28, 33, 0, 172, 3, 172, 3, 172, 3, 242, 3, 242, + 3, 242, 3, 242, 3, 242, 3, 20, 255, 20, 255, 20, 255, 20, 255, 20, 255, + 20, 255, 6, 0, 0, 0, 96, 0, 5, 156, 2, 255, 160, 2, 255, 164, 2, 255, + 168, 2, 255, 172, 2, 255, 0, 0, 96, 0, 5, 200, 2, 255, 204, 2, 255, + 208, 2, 255, 212, 2, 255, 216, 2, 255, 0, 0, 96, 0, 5, 136, 3, 255, + 140, 3, 255, 144, 3, 255, 148, 3, 255, 152, 3, 255, 0, 0, 96, 0, 5, + 156, 3, 255, 160, 3, 255, 164, 3, 255, 168, 3, 255, 172, 3, 255, 0, + 0, 96, 0, 5, 128, 3, 255, 132, 3, 255, 160, 6, 255, 180, 2, 255, 56, + 7, 255, 0, 0, 96, 0, 3, 164, 6, 255, 92, 6, 255, 152, 6, 255, 76, 76, + 76, 76, 76, 65, 65, 65, 65, 65, 133, 133, 133, 133, 132, 166, 165, 165, + 165, 165, 164, 244, 24, 3, 250, 101, 4, 204, 95, 95, 95, 95, 95, 77, + 77, 77, 77, 77, 132, 132, 132, 132, 131, 165, 164, 164, 164, 164, 164, + 244, 26, 3, 250, 102, 4, 204, 108, 108, 108, 108, 108, 88, 88, 88, 88, + 88, 132, 132, 132, 132, 131, 165, 164, 164, 164, 164, 164, 244, 31, + 3, 250, 102, 4, 204, 133, 133, 133, 133, 133, 105, 105, 105, 105, 105, + 132, 132, 132, 132, 131, 165, 164, 164, 164, 164, 164, 244, 31, 76, + 252, 255, 57, 29, 33, 0, 3, 250, 102, 4, 204, 153, 153, 153, 153, 153, + 116, 116, 116, 116, 116, 132, 132, 132, 132, 131, 165, 164, 164, 164, + 164, 164, 244, 31, 3, 250, 103, 4, 204, 179, 179, 179, 179, 179, 130, + 130, 130, 130, 130, 132, 132, 132, 132, 131, 165, 164, 164, 164, 164, + 164, 244, 31, 3, 250, 103, 36, 255, 1, 7, 181, 3, 0, 6, 10, 35, 60, + 90, 110, 125, 5, 92, 3, 62, 3, 72, 3, 92, 3, 72, 3, 152, 3, 122, 3, + 132, 3, 152, 3, 132, 3, 212, 3, 182, 3, 192, 3, 212, 3, 192, 3, 26, + 4, 252, 3, 6, 4, 26, 4, 6, 4, 96, 4, 66, 4, 76, 4, 96, 4, 76, 4, 166, + 4, 136, 4, 146, 4, 166, 4, 146, 4, 20, 255, 20, 255, 20, 255, 20, 255, + 20, 255, 20, 255, 68, 2, 48, 2, 38, 2, 18, 2, 28, 2, 128, 2, 108, 2, + 98, 2, 78, 2, 88, 2, 188, 2, 168, 2, 158, 2, 138, 2, 148, 2, 2, 3, 238, + 2, 228, 2, 208, 2, 218, 2, 72, 3, 52, 3, 42, 3, 22, 3, 32, 3, 142, 3, + 122, 3, 112, 3, 92, 3, 102, 3, 20, 255, 20, 255, 20, 255, 20, 255, 20, + 255, 20, 255, 6, 0, 0, 0, 96, 0, 5, 156, 2, 255, 160, 2, 255, 164, 2, + 255, 168, 2, 255, 172, 2, 255, 0, 0, 96, 0, 5, 200, 2, 255, 204, 2, + 255, 76, 252, 255, 52, 30, 33, 0, 208, 2, 255, 212, 2, 255, 216, 2, + 255, 0, 0, 96, 0, 5, 136, 3, 255, 140, 3, 255, 144, 3, 255, 148, 3, + 255, 152, 3, 255, 0, 0, 96, 0, 5, 156, 3, 255, 160, 3, 255, 164, 3, + 255, 168, 3, 255, 172, 3, 255, 0, 0, 96, 0, 5, 128, 3, 255, 132, 3, + 255, 160, 6, 255, 180, 2, 255, 56, 7, 255, 0, 0, 96, 0, 3, 164, 6, 255, + 92, 6, 255, 152, 6, 255, 67, 57, 55, 55, 56, 56, 53, 53, 54, 53, 136, + 134, 134, 134, 133, 168, 166, 166, 166, 164, 164, 244, 24, 3, 250, 101, + 4, 204, 76, 69, 65, 66, 67, 64, 60, 59, 59, 60, 136, 134, 134, 134, + 133, 168, 166, 166, 166, 164, 164, 244, 26, 3, 250, 102, 4, 204, 92, + 82, 82, 82, 82, 75, 71, 71, 71, 71, 136, 134, 134, 134, 133, 168, 166, + 166, 166, 164, 164, 244, 31, 3, 250, 102, 4, 204, 106, 99, 95, 95, 100, + 87, 83, 82, 82, 83, 136, 134, 134, 134, 133, 168, 166, 166, 166, 164, + 164, 244, 31, 3, 250, 102, 4, 204, 124, 113, 110, 110, 113, 97, 93, + 92, 92, 93, 136, 134, 134, 134, 133, 168, 166, 166, 166, 164, 164, 244, + 31, 3, 250, 103, 4, 204, 140, 129, 127, 127, 129, 111, 104, 103, 103, + 104, 136, 134, 134, 134, 133, 168, 166, 166, 166, 164, 164, 244, 31, + 3, 250, 103, 36, 255, 76, 252, 255, 47, 31, 33, 0, 2, 7, 127, 4, 6, + 5, 56, 4, 136, 4, 156, 4, 136, 4, 216, 4, 116, 4, 196, 4, 216, 4, 196, + 4, 20, 5, 176, 4, 0, 5, 20, 5, 0, 5, 80, 5, 246, 4, 70, 5, 90, 5, 70, + 5, 150, 5, 60, 5, 140, 5, 160, 5, 140, 5, 220, 5, 130, 5, 210, 5, 230, + 5, 210, 5, 34, 6, 20, 255, 20, 255, 20, 255, 20, 255, 20, 255, 20, 255, + 1, 0, 0, 0, 96, 0, 5, 156, 2, 255, 160, 2, 255, 164, 2, 255, 168, 2, + 255, 172, 2, 255, 76, 76, 76, 76, 76, 95, 95, 95, 95, 95, 108, 108, + 108, 108, 108, 133, 133, 133, 133, 133, 153, 153, 153, 153, 153, 179, + 179, 179, 179, 179, 2, 7, 127, 0, 6, 5, 92, 3, 62, 3, 72, 3, 92, 3, + 72, 3, 152, 3, 122, 3, 132, 3, 152, 3, 132, 3, 212, 3, 182, 3, 192, + 3, 212, 3, 192, 3, 26, 4, 252, 3, 6, 4, 26, 4, 6, 4, 96, 4, 66, 4, 76, + 4, 96, 4, 76, 4, 166, 4, 136, 4, 146, 4, 166, 4, 146, 4, 20, 255, 20, + 255, 20, 255, 20, 255, 20, 255, 20, 255, 1, 0, 0, 0, 96, 0, 5, 156, + 2, 255, 160, 2, 255, 164, 2, 255, 168, 2, 255, 172, 2, 255, 67, 57, + 55, 55, 56, 76, 69, 65, 66, 67, 92, 83, 82, 82, 82, 106, 99, 95, 95, + 100, 124, 76, 252, 255, 42, 32, 33, 0, 113, 110, 110, 113, 140, 129, + 127, 127, 129, 0, 7, 4, 63, 0, 0, 0, 3, 1, 196, 1, 8, 10, 32, 0, 8, + 8, 0, 0, 4, 4, 0, 0, 16, 16, 0, 0, 8, 8, 0, 0, 24, 24, 0, 0, 40, 40, + 0, 0, 32, 32, 0, 0, 44, 44, 0, 0, 40, 40, 0, 0, 48, 48, 0, 0, 65, 65, + 0, 0, 52, 52, 0, 0, 73, 73, 0, 0, 32, 32, 1, 1, 80, 80, 0, 0, 36, 36, + 1, 1, 88, 88, 0, 0, 64, 64, 1, 1, 138, 138, 0, 0, 96, 96, 1, 1, 139, + 139, 0, 0, 100, 100, 1, 1, 140, 140, 0, 0, 96, 96, 2, 2, 141, 141, 0, + 0, 100, 100, 2, 2, 142, 142, 0, 0, 104, 104, 2, 2, 143, 143, 0, 0, 108, + 108, 2, 2, 150, 150, 0, 0, 112, 112, 2, 2, 165, 165, 0, 0, 80, 80, 3, + 3, 166, 166, 0, 0, 84, 84, 3, 3, 221, 221, 0, 0, 116, 116, 3, 3, 229, + 229, 0, 0, 120, 120, 3, 3, 237, 237, 0, 0, 152, 152, 3, 3, 238, 238, + 0, 0, 252, 252, 3, 3, 239, 239, 0, 0, 188, 188, 3, 3, 239, 239, 0, 0, + 188, 188, 3, 3, 3, 1, 100, 200, 10, 32, 0, 64, 0, 0, 1, 64, 0, 0, 1, + 64, 0, 0, 1, 64, 0, 0, 1, 64, 0, 0, 1, 65, 0, 4, 1, 73, 0, 36, 1, 76, + 252, 255, 37, 33, 33, 0, 80, 0, 64, 1, 88, 0, 96, 1, 82, 0, 72, 1, 83, + 0, 76, 1, 84, 0, 80, 1, 85, 0, 84, 1, 86, 0, 88, 1, 87, 0, 92, 1, 102, + 0, 152, 1, 110, 0, 184, 1, 118, 0, 216, 1, 126, 0, 248, 1, 127, 0, 252, + 1, 127, 0, 252, 1, 127, 0, 252, 1, 127, 0, 252, 1, 127, 0, 252, 1, 3, + 1, 58, 40, 11, 32, 0, 1, 0, 0, 1, 0, 0, 5, 0, 0, 13, 0, 0, 29, 0, 0, + 14, 0, 0, 30, 0, 0, 62, 0, 0, 15, 0, 0, 31, 0, 0, 63, 0, 0, 127, 0, + 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, + 3, 1, 5, 8, 8, 32, 0, 6, 3, 1, 5, 12, 8, 32, 0, 5, 3, 1, 5, 16, 8, 32, + 0, 11, 3, 1, 5, 20, 8, 32, 0, 10, 4, 7, 152, 1, 4, 50, 31, 0, 0, 29, + 0, 0, 28, 1, 0, 26, 2, 0, 23, 2, 0, 21, 18, 0, 19, 85, 0, 17, 100, 0, + 15, 17, 0, 14, 3, 0, 13, 20, 0, 11, 80, 0, 10, 100, 0, 9, 35, 0, 8, + 35, 0, 7, 3, 0, 7, 22, 0, 6, 21, 0, 5, 19, 0, 5, 22, 0, 4, 19, 0, 4, + 38, 0, 4, 25, 0, 3, 5, 0, 3, 8, 0, 3, 42, 0, 2, 3, 0, 2, 22, 0, 76, + 252, 255, 32, 34, 33, 0, 2, 9, 0, 2, 43, 0, 2, 61, 0, 2, 63, 0, 1, 2, + 0, 1, 21, 0, 1, 24, 0, 1, 58, 0, 1, 29, 0, 1, 31, 0, 1, 143, 0, 1, 239, + 0, 1, 63, 1, 1, 143, 1, 1, 207, 1, 1, 15, 2, 1, 79, 2, 1, 127, 2, 1, + 175, 2, 1, 207, 2, 1, 0, 0, 1, 0, 0, 4, 7, 152, 1, 0, 50, 31, 0, 0, + 29, 0, 0, 28, 1, 0, 26, 2, 0, 23, 2, 0, 21, 18, 0, 19, 85, 0, 17, 100, + 0, 15, 17, 0, 14, 3, 0, 13, 20, 0, 11, 80, 0, 10, 100, 0, 9, 35, 0, + 8, 35, 0, 7, 3, 0, 7, 22, 0, 6, 21, 0, 5, 19, 0, 5, 22, 0, 4, 19, 0, + 4, 38, 0, 4, 25, 0, 3, 5, 0, 3, 8, 0, 3, 42, 0, 2, 3, 0, 2, 22, 0, 2, + 9, 0, 2, 43, 0, 2, 61, 0, 2, 63, 0, 1, 2, 0, 1, 21, 0, 1, 24, 0, 1, + 58, 0, 1, 29, 0, 1, 31, 0, 1, 143, 0, 1, 239, 0, 1, 63, 1, 1, 143, 1, + 1, 207, 1, 1, 15, 2, 1, 79, 2, 1, 127, 2, 1, 175, 2, 1, 207, 2, 1, 0, + 0, 1, 0, 0, 3, 7, 43, 1, 0, 0, 0, 1, 0, 0, 0, 0, 20, 10, 0, 4, 0, 0, + 0, 0, 0, 0, 10, 2, 254, 11, 228, 254, 28, 76, 252, 255, 27, 35, 33, + 0, 1, 228, 254, 28, 1, 10, 2, 254, 11, 241, 255, 15, 0, 241, 255, 15, + 0, 5, 7, 36, 255, 1, 8, 8, 12, 0, 8, 1, 4, 2, 0, 3, 252, 4, 248, 5, + 244, 6, 240, 7, 12, 0, 8, 1, 4, 2, 0, 3, 252, 4, 248, 5, 244, 6, 240, + 7, 15, 3, 40, 2, 120, 20, 127, 90, 0, 20, 2, 20, 30, 0, 2, 3, 0, 30, + 170, 51, 25, 5, 207, 0, 128, 10, 146, 0, 0, 0, 0, 7, 0, 0, 162, 0, 0, + 0, 0, 0, 0, 0, 0, 3, 1, 5, 190, 37, 32, 0, 11, 3, 1, 5, 178, 48, 32, + 0, 48, 3, 1, 5, 24, 19, 33, 0, 144, 3, 1, 5, 201, 34, 32, 0, 0, 3, 1, + 12, 220, 29, 32, 0, 1, 1, 48, 0, 2, 10, 10, 0, 3, 1, 5, 72, 44, 32, + 0, 1, 3, 1, 5, 36, 51, 32, 0, 1, 3, 1, 5, 78, 5, 32, 0, 0, 3, 1, 6, + 8, 30, 32, 0, 0, 0, 3, 1, 8, 184, 40, 32, 0, 0, 0, 0, 0, 3, 1, 5, 237, + 37, 32, 0, 0, 3, 1, 6, 198, 50, 32, 0, 42, 14, 3, 1, 6, 172, 44, 32, + 0, 240, 0, 3, 1, 6, 236, 39, 32, 0, 128, 7, 3, 1, 5, 152, 52, 32, 0, + 0, 4, 3, 12, 32, 0, 32, 0, 20, 20, 26, 102, 10, 21, 0, 0, 5, 3, 32, + 76, 252, 255, 22, 36, 33, 0, 0, 27, 40, 80, 255, 255, 63, 0, 5, 3, 31, + 12, 194, 1, 80, 80, 174, 56, 186, 10, 5, 0, 255, 255, 7, 227, 50, 0, + 184, 168, 198, 255, 17, 3, 4, 64, 129, 0, 0, 10, 3, 4, 212, 48, 0, 0, + 3, 1, 20, 124, 96, 13, 0, 60, 28, 32, 0, 52, 28, 32, 0, 44, 28, 32, + 0, 0, 10, 20, 0, 3, 1, 172, 19, 140, 96, 13, 0, 156, 91, 32, 0, 184, + 216, 32, 0, 24, 215, 32, 0, 76, 215, 32, 0, 128, 215, 32, 0, 180, 215, + 32, 0, 232, 215, 32, 0, 28, 216, 32, 0, 80, 216, 32, 0, 132, 216, 32, + 0, 0, 0, 0, 0, 119, 91, 3, 0, 71, 106, 3, 0, 191, 15, 13, 0, 0, 0, 0, + 0, 121, 15, 13, 0, 0, 0, 0, 0, 49, 16, 13, 0, 17, 16, 13, 0, 235, 97, + 3, 0, 141, 98, 3, 0, 59, 86, 3, 0, 93, 209, 7, 0, 223, 215, 7, 0, 171, + 124, 7, 0, 0, 0, 0, 0, 33, 20, 13, 0, 0, 0, 0, 0, 251, 19, 13, 0, 233, + 126, 7, 0, 181, 125, 7, 0, 169, 127, 7, 0, 29, 206, 7, 0, 93, 209, 7, + 0, 223, 215, 7, 0, 231, 205, 7, 0, 0, 0, 0, 0, 147, 20, 13, 0, 0, 0, + 0, 0, 85, 20, 13, 0, 165, 209, 7, 0, 171, 210, 7, 0, 103, 215, 7, 0, + 29, 206, 76, 252, 255, 17, 37, 33, 0, 7, 0, 255, 0, 0, 0, 56, 10, 33, + 0, 0, 0, 48, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 211, + 30, 13, 0, 217, 30, 13, 0, 117, 31, 13, 0, 151, 32, 13, 0, 0, 12, 0, + 0, 143, 251, 6, 0, 253, 58, 13, 0, 239, 59, 13, 0, 31, 2, 7, 0, 193, + 3, 7, 0, 0, 0, 0, 0, 125, 6, 7, 0, 231, 10, 7, 0, 221, 59, 13, 0, 141, + 254, 6, 0, 97, 4, 7, 0, 0, 0, 0, 0, 219, 230, 2, 0, 53, 60, 13, 0, 13, + 230, 2, 0, 253, 230, 2, 0, 203, 236, 2, 0, 0, 0, 0, 0, 253, 232, 2, + 0, 0, 0, 0, 0, 139, 233, 2, 0, 103, 235, 2, 0, 249, 231, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, + 0, 0, 0, 0, 0, 194, 11, 163, 18, 133, 23, 78, 27, 102, 30, 3, 76, 252, + 255, 12, 38, 33, 0, 33, 71, 35, 70, 37, 16, 39, 174, 40, 40, 42, 131, + 43, 197, 44, 241, 45, 9, 47, 16, 48, 9, 49, 244, 49, 210, 50, 166, 51, + 112, 52, 49, 53, 234, 53, 155, 54, 70, 55, 234, 55, 136, 56, 32, 57, + 179, 57, 66, 58, 203, 58, 81, 59, 211, 59, 81, 60, 203, 60, 66, 61, + 182, 61, 39, 62, 149, 62, 0, 63, 104, 63, 207, 63, 51, 64, 148, 64, + 244, 64, 81, 65, 172, 65, 6, 66, 94, 66, 180, 66, 8, 67, 91, 67, 172, + 67, 252, 67, 74, 68, 151, 68, 226, 68, 45, 69, 118, 69, 189, 69, 4, + 70, 73, 70, 142, 70, 209, 70, 19, 71, 85, 71, 149, 71, 212, 71, 19, + 72, 81, 72, 141, 72, 201, 72, 4, 73, 63, 73, 120, 73, 177, 73, 233, + 73, 32, 74, 87, 74, 141, 74, 194, 74, 247, 74, 43, 75, 94, 75, 145, + 75, 195, 75, 245, 75, 38, 76, 86, 76, 134, 76, 182, 76, 229, 76, 19, + 77, 65, 77, 111, 77, 156, 77, 200, 77, 244, 77, 32, 78, 75, 78, 118, + 78, 160, 78, 202, 78, 244, 78, 29, 79, 70, 79, 110, 79, 150, 79, 190, + 79, 229, 79, 12, 80, 51, 80, 89, 80, 127, 80, 165, 80, 202, 80, 239, + 80, 19, 81, 56, 81, 92, 81, 128, 81, 163, 81, 198, 81, 233, 81, 12, + 82, 46, 82, 80, 82, 114, 82, 147, 82, 181, 82, 214, 82, 76, 252, 255, + 7, 39, 33, 0, 247, 82, 23, 83, 55, 83, 87, 83, 119, 83, 151, 83, 182, + 83, 213, 83, 244, 83, 19, 84, 49, 84, 80, 84, 110, 84, 140, 84, 169, + 84, 199, 84, 228, 84, 1, 85, 30, 85, 58, 85, 87, 85, 115, 85, 143, 85, + 171, 85, 199, 85, 227, 85, 254, 85, 25, 86, 52, 86, 79, 86, 106, 86, + 132, 86, 159, 86, 185, 86, 211, 86, 237, 86, 7, 87, 32, 87, 58, 87, + 83, 87, 108, 87, 133, 87, 158, 87, 183, 87, 208, 87, 232, 87, 1, 88, + 25, 88, 49, 88, 73, 88, 97, 88, 120, 88, 144, 88, 167, 88, 190, 88, + 214, 88, 237, 88, 4, 89, 26, 89, 49, 89, 72, 89, 94, 89, 116, 89, 139, + 89, 161, 89, 183, 89, 205, 89, 226, 89, 248, 89, 14, 90, 35, 90, 56, + 90, 78, 90, 99, 90, 120, 90, 141, 90, 161, 90, 182, 90, 203, 90, 223, + 90, 244, 90, 8, 91, 28, 91, 49, 91, 69, 91, 89, 91, 108, 91, 128, 91, + 148, 91, 168, 91, 187, 91, 206, 91, 226, 91, 245, 91, 8, 92, 27, 92, + 46, 92, 65, 92, 84, 92, 103, 92, 122, 92, 140, 92, 159, 92, 177, 92, + 195, 92, 214, 92, 232, 92, 250, 92, 12, 93, 30, 93, 48, 93, 66, 93, + 84, 93, 101, 93, 119, 93, 137, 93, 154, 93, 171, 93, 189, 93, 206, 93, + 223, 93, 240, 93, 1, 94, 0, 0, 0, 0, 0, 76, 252, 255, 2, 40, 33, 0, + 0, 0, 0, 0, 0, 112, 1, 101, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 96, + 1, 101, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 192, 4, 65, 0, 0, 0, + 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 161, 81, 13, 0, 188, 188, 188, 188, + 67, 67, 67, 67, 0, 0, 0, 0, 188, 1, 96, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 33, 182, 2, 0, 188, 188, 188, 188, 67, 67, 67, 67, 0, 0, 0, + 0, 32, 0, 96, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 28, 0, 96, 0, + 64, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 24, 0, 96, 0, 0, 0, 0, 0, 255, + 0, 0, 0, 0, 0, 0, 0, 20, 0, 96, 0, 240, 0, 0, 0, 255, 0, 0, 0, 0, 0, + 0, 0, 192, 4, 65, 0, 1, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 44, 0, + 96, 0, 48, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 36, 0, 96, 0, 255, 0, + 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 13, 82, 13, 0, 188, 188, 188, 188, 67, + 67, 67, 67, 0, 0, 0, 0, 232, 2, 96, 0, 64, 0, 0, 0, 240, 0, 0, 0, 0, + 0, 0, 0, 100, 4, 65, 0, 186, 64, 76, 252, 255, 253, 40, 33, 0, 0, 0, + 255, 255, 0, 0, 0, 0, 0, 0, 96, 4, 65, 0, 192, 80, 0, 0, 255, 255, 0, + 0, 0, 0, 0, 0, 53, 81, 13, 0, 188, 188, 188, 188, 67, 67, 67, 67, 0, + 0, 0, 0, 52, 6, 65, 0, 128, 24, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 96, + 1, 96, 0, 85, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 48, 4, 65, 0, 233, + 2, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 220, 6, 65, 0, 241, 130, 0, 0, + 255, 255, 0, 0, 0, 0, 0, 0, 192, 4, 65, 0, 33, 0, 0, 0, 255, 255, 0, + 0, 0, 0, 0, 0, 136, 4, 65, 0, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, + 167, 82, 13, 0, 188, 188, 188, 188, 67, 67, 67, 67, 0, 0, 0, 0, 211, + 82, 13, 0, 188, 188, 188, 188, 67, 67, 67, 67, 0, 0, 0, 0, 69, 82, 13, + 0, 188, 188, 188, 188, 67, 67, 67, 67, 0, 0, 0, 0, 156, 2, 96, 0, 0, + 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 160, 2, 96, 0, 0, 0, 0, 0, 255, 0, + 0, 0, 0, 0, 0, 0, 164, 2, 96, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, + 0, 168, 2, 96, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 172, 76, 252, + 255, 248, 41, 33, 0, 2, 96, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, + 200, 2, 96, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 204, 2, 96, 0, + 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 208, 2, 96, 0, 0, 0, 0, 0, 255, + 0, 0, 0, 0, 0, 0, 0, 212, 2, 96, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, + 0, 0, 216, 2, 96, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 93, 81, 13, + 0, 188, 188, 188, 188, 67, 67, 67, 67, 0, 0, 0, 0, 129, 183, 2, 0, 188, + 188, 188, 188, 67, 67, 67, 67, 0, 0, 0, 0, 240, 0, 100, 0, 1, 0, 0, + 0, 255, 0, 0, 0, 0, 0, 0, 0, 228, 0, 100, 0, 12, 0, 0, 0, 255, 0, 0, + 0, 0, 0, 0, 0, 224, 0, 100, 0, 48, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, 2, 96, 0, 1, 0, + 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 188, 1, 96, 0, 1, 0, 0, 0, 255, 0, 0, + 0, 0, 0, 0, 0, 161, 81, 13, 0, 188, 188, 188, 188, 67, 67, 67, 67, 0, + 0, 0, 0, 12, 1, 96, 0, 0, 0, 0, 0, 255, 0, 0, 0, 76, 252, 255, 243, + 42, 33, 0, 0, 0, 0, 0, 255, 82, 13, 0, 188, 188, 188, 188, 67, 67, 67, + 67, 0, 0, 0, 0, 96, 1, 101, 0, 1, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, + 0, 112, 1, 101, 0, 1, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 248, 0, 100, + 0, 223, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 200, 0, 100, 0, 24, 0, + 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 32, 0, 96, 0, 190, 0, 0, 0, 255, 0, + 0, 0, 0, 0, 0, 0, 28, 0, 96, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, + 0, 24, 0, 96, 0, 15, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 20, 0, 96, 0, + 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 36, 0, 96, 0, 255, 0, 0, 0, + 255, 0, 0, 0, 0, 0, 0, 0, 44, 0, 96, 0, 48, 0, 0, 0, 255, 0, 0, 0, 0, + 0, 0, 0, 220, 4, 96, 0, 8, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 232, 4, + 65, 0, 2, 194, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 100, 4, 65, 0, 186, 64, + 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 52, 6, 65, 0, 0, 72, 0, 0, 255, 255, + 0, 0, 0, 0, 0, 0, 232, 2, 96, 0, 69, 0, 0, 76, 252, 255, 238, 43, 33, + 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 167, 82, 13, 0, 188, 188, 188, 188, + 67, 67, 67, 67, 0, 0, 0, 0, 211, 82, 13, 0, 188, 188, 188, 188, 67, + 67, 67, 67, 0, 0, 0, 0, 53, 81, 13, 0, 188, 188, 188, 188, 67, 67, 67, + 67, 0, 0, 0, 0, 93, 81, 13, 0, 188, 188, 188, 188, 67, 67, 67, 67, 0, + 0, 0, 0, 11, 84, 13, 0, 188, 188, 188, 188, 67, 67, 67, 67, 0, 0, 0, + 0, 31, 83, 13, 0, 188, 188, 188, 188, 67, 67, 67, 67, 0, 0, 0, 0, 192, + 4, 65, 0, 33, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 179, 83, 13, 0, 188, + 188, 188, 188, 67, 67, 67, 67, 0, 0, 0, 0, 101, 82, 13, 0, 188, 188, + 188, 188, 67, 67, 67, 67, 0, 0, 0, 0, 240, 0, 100, 0, 1, 0, 0, 0, 255, + 0, 0, 0, 0, 0, 0, 0, 228, 0, 100, 0, 12, 0, 0, 0, 255, 0, 0, 0, 0, 0, + 0, 0, 224, 0, 100, 0, 48, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 160, 2, 0, 17, 81, 13, 0, + 57, 160, 2, 0, 87, 160, 2, 0, 211, 160, 2, 0, 123, 161, 2, 0, 181, 161, + 2, 0, 197, 162, 2, 0, 0, 0, 76, 252, 255, 233, 44, 33, 0, 0, 0, 12, + 0, 10, 5, 8, 6, 6, 10, 4, 11, 2, 13, 0, 15, 254, 17, 252, 19, 250, 21, + 248, 23, 246, 25, 244, 27, 242, 29, 240, 31, 238, 33, 236, 35, 234, + 37, 232, 39, 230, 41, 10, 1, 8, 5, 6, 7, 4, 11, 2, 12, 0, 14, 100, 1, + 96, 0, 104, 1, 96, 0, 108, 1, 96, 0, 112, 1, 96, 0, 116, 1, 96, 0, 120, + 1, 96, 0, 124, 1, 96, 0, 132, 1, 96, 0, 169, 53, 13, 0, 3, 0, 70, 0, + 193, 53, 13, 0, 3, 0, 8, 0, 161, 42, 13, 0, 3, 0, 0, 0, 13, 51, 13, + 0, 6, 0, 9, 0, 163, 51, 13, 0, 4, 0, 8, 0, 163, 52, 13, 0, 4, 0, 6, + 0, 181, 52, 13, 0, 3, 0, 7, 0, 149, 43, 13, 0, 0, 0, 14, 0, 193, 71, + 13, 0, 10, 0, 6, 0, 165, 43, 13, 0, 35, 0, 0, 0, 73, 89, 13, 0, 4, 0, + 6, 0, 31, 43, 13, 0, 13, 0, 6, 0, 47, 50, 13, 0, 0, 0, 0, 0, 195, 50, + 13, 0, 3, 0, 14, 0, 143, 190, 1, 0, 0, 0, 6, 0, 223, 43, 13, 0, 0, 0, + 6, 0, 7, 44, 13, 0, 10, 0, 6, 0, 197, 52, 13, 0, 12, 0, 6, 0, 165, 45, + 13, 0, 10, 0, 0, 0, 11, 46, 13, 0, 7, 0, 0, 0, 43, 44, 13, 0, 28, 76, + 252, 255, 228, 45, 33, 0, 0, 0, 0, 93, 45, 13, 0, 3, 0, 0, 0, 223, 52, + 13, 0, 5, 0, 7, 0, 0, 0, 0, 0, 37, 0, 0, 0, 41, 56, 13, 0, 16, 0, 0, + 0, 0, 0, 0, 0, 3, 1, 5, 50, 12, 33, 0, 0, 3, 1, 5, 49, 12, 33, 0, 3, + 3, 1, 5, 48, 12, 33, 0, 0, 3, 1, 8, 44, 12, 33, 0, 36, 160, 0, 0, 3, + 1, 5, 40, 12, 33, 0, 1, 3, 1, 5, 41, 12, 33, 0, 0, 3, 1, 8, 36, 12, + 33, 0, 185, 185, 187, 185, 3, 1, 8, 32, 12, 33, 0, 185, 185, 187, 185, + 3, 1, 5, 28, 12, 33, 0, 0, 3, 1, 6, 30, 12, 33, 0, 0, 0, 3, 1, 8, 20, + 12, 33, 0, 16, 0, 0, 0, 3, 1, 8, 24, 12, 33, 0, 15, 0, 0, 0, 3, 1, 40, + 240, 11, 33, 0, 82, 102, 252, 252, 62, 82, 253, 253, 42, 62, 254, 254, + 22, 42, 255, 255, 2, 22, 0, 0, 238, 2, 1, 1, 218, 238, 2, 2, 198, 218, + 3, 3, 178, 198, 4, 4, 3, 1, 5, 235, 11, 33, 0, 0, 3, 1, 5, 236, 11, + 33, 0, 0, 3, 1, 5, 237, 11, 33, 0, 0, 3, 1, 5, 233, 11, 33, 0, 0, 3, + 1, 5, 232, 11, 33, 0, 0, 3, 1, 5, 234, 11, 33, 0, 0, 3, 1, 6, 238, 11, + 33, 0, 144, 1, 76, 252, 255, 223, 46, 33, 0, 3, 1, 8, 228, 11, 33, 0, + 40, 0, 0, 0, 3, 1, 8, 224, 11, 33, 0, 15, 0, 0, 0, 3, 1, 5, 222, 11, + 33, 0, 182, 3, 1, 5, 223, 11, 33, 0, 170, 3, 1, 5, 221, 11, 33, 0, 1, + 3, 1, 5, 220, 11, 33, 0, 40, 3, 1, 5, 219, 11, 33, 0, 1, 3, 1, 5, 218, + 11, 33, 0, 0, 3, 1, 5, 216, 11, 33, 0, 0, 3, 1, 5, 217, 11, 33, 0, 0, + 3, 1, 164, 3, 56, 10, 33, 0, 156, 1, 96, 0, 140, 2, 96, 0, 136, 2, 96, + 0, 152, 2, 96, 0, 148, 4, 65, 0, 152, 4, 65, 0, 12, 0, 0, 0, 0, 0, 0, + 0, 93, 0, 0, 0, 6, 0, 0, 0, 93, 0, 0, 0, 108, 2, 0, 0, 3, 128, 0, 0, + 6, 0, 0, 0, 9, 0, 0, 0, 93, 0, 0, 0, 6, 0, 0, 0, 93, 0, 0, 0, 108, 2, + 0, 0, 3, 128, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 93, 0, 0, 0, 6, 0, 0, 0, + 93, 0, 0, 0, 108, 2, 0, 0, 3, 128, 0, 0, 250, 0, 0, 0, 21, 0, 0, 0, + 93, 0, 0, 0, 6, 0, 0, 0, 93, 0, 0, 0, 108, 2, 0, 0, 3, 128, 0, 0, 244, + 0, 0, 0, 27, 0, 0, 0, 93, 0, 0, 0, 6, 0, 0, 0, 93, 0, 0, 0, 108, 76, + 252, 255, 218, 47, 33, 0, 2, 0, 0, 3, 128, 0, 0, 238, 0, 0, 0, 33, 0, + 0, 0, 93, 0, 0, 0, 6, 0, 0, 0, 93, 0, 0, 0, 108, 2, 0, 0, 3, 128, 0, + 0, 232, 0, 0, 0, 39, 0, 0, 0, 93, 0, 0, 0, 6, 0, 0, 0, 93, 0, 0, 0, + 108, 2, 0, 0, 3, 128, 0, 0, 226, 0, 0, 0, 45, 0, 0, 0, 93, 0, 0, 0, + 6, 0, 0, 0, 93, 0, 0, 0, 108, 2, 0, 0, 3, 128, 0, 0, 220, 0, 0, 0, 49, + 0, 0, 0, 93, 0, 0, 0, 6, 0, 0, 0, 93, 0, 0, 0, 108, 2, 0, 0, 3, 128, + 0, 0, 214, 0, 0, 0, 49, 0, 0, 0, 93, 0, 0, 0, 6, 0, 0, 0, 93, 0, 0, + 0, 108, 2, 0, 0, 1, 128, 0, 0, 208, 0, 0, 0, 49, 0, 0, 0, 93, 0, 0, + 0, 6, 0, 0, 0, 16, 0, 0, 0, 92, 2, 0, 0, 1, 128, 0, 0, 202, 0, 0, 0, + 49, 0, 0, 0, 93, 0, 0, 0, 6, 0, 0, 0, 93, 0, 0, 0, 74, 2, 0, 0, 1, 128, + 0, 0, 196, 0, 0, 0, 49, 0, 0, 0, 93, 0, 0, 0, 6, 0, 0, 0, 93, 0, 0, + 0, 68, 2, 0, 0, 1, 128, 0, 0, 190, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 76, 252, 255, 213, 48, 33, 0, 68, 2, 0, 0, 1, + 128, 0, 0, 3, 1, 5, 52, 10, 33, 0, 1, 3, 1, 5, 49, 10, 33, 0, 6, 3, + 1, 5, 50, 10, 33, 0, 4, 3, 1, 5, 51, 10, 33, 0, 0, 3, 1, 5, 48, 10, + 33, 0, 0, 3, 1, 24, 0, 2, 13, 0, 145, 248, 216, 33, 1, 104, 33, 244, + 64, 1, 10, 177, 1, 245, 128, 1, 92, 247, 55, 189, 3, 1, 20, 20, 2, 13, + 0, 143, 176, 0, 36, 1, 72, 196, 97, 109, 247, 134, 188, 0, 63, 32, 0, + 3, 1, 20, 36, 2, 13, 0, 48, 70, 161, 123, 106, 70, 11, 171, 0, 240, + 68, 251, 109, 247, 28, 189, 3, 1, 24, 52, 2, 13, 0, 168, 105, 112, 247, + 102, 253, 176, 241, 128, 111, 1, 210, 108, 247, 9, 189, 108, 247, 16, + 189, 3, 1, 20, 72, 2, 13, 0, 32, 70, 0, 125, 2, 40, 1, 209, 32, 70, + 144, 71, 109, 247, 68, 184, 3, 1, 28, 88, 2, 13, 0, 4, 72, 0, 120, 8, + 177, 0, 240, 75, 251, 3, 32, 51, 247, 32, 253, 108, 247, 99, 190, 48, + 10, 33, 0, 3, 1, 16, 112, 2, 13, 0, 33, 0, 0, 240, 77, 251, 160, 117, + 112, 189, 0, 0, 3, 1, 32, 124, 2, 13, 0, 2, 180, 8, 70, 5, 240, 119, + 253, 2, 188, 32, 177, 62, 32, 91, 247, 219, 252, 177, 247, 113, 188, + 189, 76, 252, 255, 208, 49, 33, 0, 232, 240, 159, 0, 0, 3, 1, 14, 152, + 2, 13, 0, 16, 34, 168, 247, 89, 253, 169, 247, 15, 184, 3, 1, 16, 162, + 2, 13, 0, 2, 213, 32, 70, 0, 240, 247, 251, 168, 247, 139, 187, 3, 1, + 20, 174, 2, 13, 0, 104, 70, 140, 247, 221, 249, 16, 185, 32, 70, 117, + 247, 121, 250, 124, 189, 3, 1, 14, 190, 2, 13, 0, 189, 232, 14, 64, + 0, 240, 75, 188, 0, 0, 3, 1, 22, 200, 2, 13, 0, 162, 247, 184, 255, + 24, 185, 96, 104, 8, 177, 117, 247, 108, 250, 163, 247, 77, 187, 3, + 1, 26, 218, 2, 13, 0, 177, 247, 12, 252, 33, 120, 155, 248, 4, 0, 129, + 66, 1, 211, 163, 247, 50, 191, 163, 247, 196, 190, 3, 1, 24, 240, 2, + 13, 0, 49, 185, 193, 143, 1, 41, 3, 209, 176, 248, 70, 16, 164, 247, + 73, 185, 164, 247, 89, 185, 3, 1, 12, 4, 3, 13, 0, 0, 240, 40, 253, + 124, 189, 0, 0, 3, 1, 16, 12, 3, 13, 0, 0, 181, 0, 240, 134, 255, 93, + 248, 4, 235, 112, 71, 3, 1, 12, 24, 3, 13, 0, 115, 247, 76, 252, 114, + 247, 50, 186, 3, 1, 18, 32, 3, 13, 0, 32, 70, 107, 247, 5, 255, 48, + 70, 117, 247, 155, 248, 112, 189, 3, 1, 22, 46, 3, 13, 0, 32, 70, 0, + 240, 42, 254, 24, 177, 212, 248, 152, 32, 76, 252, 255, 203, 50, 33, + 0, 100, 247, 147, 191, 16, 189, 3, 1, 20, 64, 3, 13, 0, 32, 70, 0, 240, + 47, 254, 255, 32, 132, 248, 29, 1, 102, 247, 27, 189, 3, 1, 20, 80, + 3, 13, 0, 32, 70, 0, 240, 39, 254, 255, 32, 132, 248, 29, 1, 101, 247, + 120, 188, 3, 1, 24, 96, 3, 13, 0, 212, 248, 212, 0, 174, 247, 116, 248, + 0, 33, 212, 248, 216, 0, 100, 247, 186, 190, 0, 0, 3, 1, 20, 116, 3, + 13, 0, 0, 240, 141, 255, 8, 177, 165, 247, 97, 189, 165, 247, 111, 189, + 0, 0, 3, 1, 20, 132, 3, 13, 0, 163, 66, 1, 211, 167, 247, 6, 188, 68, + 33, 167, 247, 4, 188, 0, 0, 3, 1, 20, 148, 3, 13, 0, 1, 240, 145, 248, + 32, 70, 189, 232, 16, 64, 106, 247, 192, 190, 0, 0, 3, 1, 20, 164, 3, + 13, 0, 132, 248, 48, 1, 32, 70, 0, 240, 251, 253, 161, 247, 147, 185, + 0, 0, 3, 1, 12, 180, 3, 13, 0, 1, 240, 146, 255, 32, 70, 112, 189, 3, + 1, 26, 188, 3, 13, 0, 16, 34, 8, 168, 113, 247, 106, 255, 8, 177, 147, + 247, 23, 189, 2, 240, 163, 248, 147, 247, 19, 189, 3, 1, 22, 210, 3, + 13, 0, 4, 168, 8, 169, 14, 170, 2, 240, 165, 248, 8, 168, 147, 247, + 23, 187, 0, 0, 3, 1, 12, 228, 3, 13, 0, 189, 232, 248, 67, 76, 252, + 255, 198, 51, 33, 0, 2, 240, 100, 185, 3, 1, 16, 236, 3, 13, 0, 32, + 70, 2, 240, 173, 250, 1, 36, 140, 247, 183, 189, 3, 1, 22, 248, 3, 13, + 0, 32, 70, 41, 70, 2, 240, 54, 251, 8, 177, 79, 247, 123, 190, 79, 247, + 141, 190, 3, 1, 30, 10, 4, 13, 0, 97, 136, 193, 243, 201, 1, 0, 41, + 3, 208, 3, 40, 3, 208, 79, 247, 218, 185, 79, 247, 93, 186, 79, 247, + 216, 185, 3, 1, 28, 36, 4, 13, 0, 225, 121, 1, 41, 3, 208, 32, 40, 3, + 211, 132, 247, 211, 188, 132, 247, 216, 188, 132, 247, 224, 188, 0, + 0, 3, 1, 20, 60, 4, 13, 0, 32, 136, 2, 33, 6, 34, 227, 28, 189, 232, + 16, 64, 51, 247, 62, 185, 3, 1, 28, 76, 4, 13, 0, 79, 244, 250, 87, + 74, 70, 65, 70, 32, 70, 2, 240, 241, 252, 8, 185, 127, 247, 213, 190, + 127, 247, 208, 190, 3, 1, 28, 100, 4, 13, 0, 187, 70, 79, 244, 250, + 44, 32, 70, 2, 240, 14, 253, 8, 177, 127, 247, 84, 191, 127, 247, 108, + 191, 0, 0, 3, 1, 28, 124, 4, 13, 0, 4, 112, 125, 247, 146, 251, 94, + 247, 67, 252, 91, 247, 253, 251, 91, 247, 83, 252, 91, 247, 156, 187, + 0, 0, 3, 1, 24, 148, 4, 13, 0, 2, 180, 48, 247, 102, 250, 2, 188, 32, + 70, 48, 247, 94, 254, 48, 247, 76, 252, 255, 193, 52, 33, 0, 64, 191, + 0, 0, 3, 1, 48, 168, 4, 13, 0, 9, 75, 27, 120, 51, 177, 148, 249, 26, + 16, 70, 49, 90, 41, 8, 216, 83, 247, 224, 190, 148, 249, 26, 16, 21, + 49, 30, 41, 1, 216, 83, 247, 217, 190, 83, 247, 191, 190, 0, 0, 52, + 10, 33, 0, 3, 1, 28, 212, 4, 13, 0, 33, 122, 1, 41, 3, 208, 32, 40, + 3, 211, 83, 247, 193, 190, 83, 247, 197, 190, 83, 247, 177, 190, 0, + 0, 3, 1, 16, 236, 4, 13, 0, 40, 70, 3, 240, 13, 248, 72, 247, 216, 187, + 0, 0, 3, 1, 52, 248, 4, 13, 0, 71, 242, 20, 1, 136, 66, 3, 209, 8, 72, + 0, 120, 0, 177, 16, 189, 8, 32, 117, 247, 151, 248, 1, 0, 249, 208, + 71, 242, 20, 2, 148, 66, 2, 209, 1, 34, 1, 72, 2, 112, 139, 247, 249, + 191, 104, 97, 13, 0, 3, 1, 12, 40, 5, 13, 0, 3, 240, 82, 248, 16, 189, + 0, 0, 3, 1, 20, 48, 5, 13, 0, 21, 127, 6, 45, 1, 208, 194, 248, 26, + 64, 134, 247, 115, 187, 0, 0, 3, 1, 20, 64, 5, 13, 0, 32, 177, 8, 32, + 132, 248, 162, 0, 150, 247, 89, 185, 112, 189, 0, 0, 3, 1, 16, 80, 5, + 13, 0, 32, 70, 3, 240, 43, 249, 189, 232, 240, 129, 0, 0, 3, 1, 20, + 92, 5, 13, 0, 232, 96, 1, 32, 76, 252, 255, 188, 53, 33, 0, 168, 118, + 0, 32, 104, 118, 153, 247, 220, 189, 0, 0, 3, 1, 16, 108, 5, 13, 0, + 200, 248, 8, 16, 3, 240, 150, 249, 114, 247, 14, 191, 3, 1, 76, 120, + 5, 13, 0, 12, 73, 9, 120, 65, 177, 12, 73, 8, 120, 40, 177, 0, 32, 8, + 112, 10, 73, 79, 240, 1, 0, 8, 112, 9, 73, 12, 32, 8, 96, 9, 72, 1, + 105, 65, 240, 1, 1, 1, 97, 1, 104, 65, 240, 1, 1, 1, 96, 0, 32, 112, + 71, 218, 11, 33, 0, 151, 30, 32, 0, 106, 97, 13, 0, 52, 9, 100, 0, 96, + 1, 101, 0, 3, 1, 24, 192, 5, 13, 0, 102, 247, 85, 252, 24, 185, 224, + 105, 192, 2, 115, 247, 99, 185, 115, 247, 98, 185, 0, 0, 3, 1, 28, 212, + 5, 13, 0, 5, 209, 4, 72, 0, 120, 16, 185, 96, 125, 85, 247, 243, 191, + 0, 0, 85, 247, 250, 191, 219, 11, 33, 0, 3, 1, 32, 236, 5, 13, 0, 0, + 40, 8, 208, 0, 41, 6, 208, 136, 66, 200, 191, 64, 26, 184, 191, 9, 26, + 249, 209, 112, 71, 0, 32, 112, 71, 0, 0, 3, 1, 28, 8, 6, 13, 0, 148, + 248, 157, 0, 32, 240, 1, 0, 132, 248, 157, 0, 104, 3, 1, 213, 111, 247, + 58, 185, 111, 247, 66, 185, 3, 1, 36, 32, 6, 13, 0, 8, 208, 1, 6, 6, + 213, 148, 248, 168, 0, 76, 252, 255, 183, 54, 33, 0, 3, 240, 212, 249, + 192, 126, 192, 7, 3, 208, 148, 248, 148, 0, 111, 247, 107, 185, 111, + 247, 107, 185, 3, 1, 44, 64, 6, 13, 0, 128, 123, 112, 247, 216, 251, + 5, 70, 48, 104, 176, 248, 216, 16, 168, 178, 112, 247, 25, 252, 249, + 136, 136, 66, 4, 221, 48, 104, 144, 248, 168, 0, 110, 247, 214, 189, + 110, 247, 214, 189, 3, 1, 22, 104, 6, 13, 0, 5, 208, 0, 181, 106, 247, + 218, 253, 106, 247, 231, 254, 0, 189, 158, 247, 86, 191, 3, 1, 22, 122, + 6, 13, 0, 8, 185, 132, 248, 68, 96, 248, 178, 132, 248, 62, 0, 158, + 247, 34, 190, 0, 0, 3, 1, 20, 140, 6, 13, 0, 132, 248, 136, 0, 1, 32, + 132, 248, 33, 0, 125, 247, 7, 188, 0, 0, 3, 1, 20, 156, 6, 13, 0, 2, + 45, 189, 232, 112, 64, 1, 208, 107, 247, 220, 188, 107, 247, 66, 189, + 3, 1, 16, 172, 6, 13, 0, 32, 70, 3, 240, 173, 249, 132, 247, 168, 184, + 0, 0, 3, 1, 10, 184, 6, 13, 0, 3, 240, 212, 251, 112, 189, 3, 1, 10, + 190, 6, 13, 0, 3, 240, 254, 251, 16, 189, 3, 1, 8, 196, 6, 13, 0, 16, + 181, 16, 189, 3, 1, 8, 200, 6, 13, 0, 3, 240, 100, 188, 3, 1, 12, 204, + 6, 13, 0, 3, 240, 99, 252, 16, 189, 0, 0, 3, 1, 10, 212, 76, 252, 255, + 178, 55, 33, 0, 6, 13, 0, 3, 240, 255, 252, 112, 189, 3, 1, 20, 218, + 6, 13, 0, 15, 180, 3, 240, 40, 253, 15, 188, 189, 232, 16, 64, 157, + 247, 4, 187, 3, 1, 26, 234, 6, 13, 0, 0, 32, 15, 180, 3, 240, 159, 253, + 15, 188, 134, 247, 78, 250, 32, 104, 139, 247, 39, 184, 0, 0, 3, 1, + 12, 0, 7, 13, 0, 4, 240, 132, 248, 189, 232, 240, 129, 3, 1, 12, 8, + 7, 13, 0, 189, 232, 240, 79, 4, 240, 247, 185, 3, 1, 16, 16, 7, 13, + 0, 98, 247, 129, 251, 173, 248, 12, 0, 100, 247, 46, 187, 3, 1, 12, + 28, 7, 13, 0, 4, 240, 139, 250, 100, 247, 135, 184, 3, 1, 32, 36, 7, + 13, 0, 41, 70, 50, 70, 4, 240, 123, 251, 6, 70, 44, 177, 57, 70, 4, + 240, 105, 251, 7, 70, 98, 247, 14, 191, 98, 247, 20, 191, 3, 1, 20, + 64, 7, 13, 0, 0, 45, 3, 208, 5, 45, 1, 208, 99, 247, 42, 184, 189, 232, + 240, 129, 3, 1, 10, 80, 7, 13, 0, 4, 240, 120, 252, 112, 189, 3, 1, + 18, 86, 7, 13, 0, 2, 209, 1, 32, 75, 247, 213, 191, 4, 240, 186, 252, + 16, 189, 3, 1, 20, 100, 7, 13, 0, 2, 240, 68, 255, 32, 70, 41, 70, 116, + 247, 136, 252, 79, 247, 206, 191, 3, 1, 10, 116, 7, 13, 0, 5, 240, 172, + 250, 76, 252, 255, 173, 56, 33, 0, 112, 189, 3, 1, 10, 122, 7, 13, 0, + 5, 240, 221, 250, 112, 189, 3, 1, 16, 128, 7, 13, 0, 25, 177, 4, 70, + 0, 32, 130, 247, 35, 187, 112, 189, 3, 1, 44, 140, 7, 13, 0, 153, 248, + 0, 48, 75, 185, 5, 180, 5, 240, 4, 251, 3, 0, 5, 188, 27, 177, 70, 234, + 3, 6, 98, 247, 183, 185, 2, 75, 2, 235, 66, 2, 98, 247, 107, 185, 142, + 94, 8, 0, 3, 1, 12, 180, 7, 13, 0, 0, 136, 192, 245, 88, 32, 16, 189, + 3, 1, 12, 188, 7, 13, 0, 5, 240, 2, 251, 112, 189, 0, 0, 3, 1, 20, 196, + 7, 13, 0, 32, 70, 2, 73, 50, 247, 133, 252, 166, 247, 143, 188, 105, + 94, 13, 0, 3, 1, 20, 212, 7, 13, 0, 5, 240, 18, 251, 1, 72, 2, 36, 165, + 247, 212, 191, 108, 159, 32, 0, 3, 1, 12, 228, 7, 13, 0, 5, 240, 106, + 251, 50, 247, 182, 187, 3, 1, 28, 236, 7, 13, 0, 4, 70, 13, 70, 5, 240, + 110, 251, 16, 177, 2, 74, 50, 247, 245, 188, 112, 189, 0, 0, 196, 24, + 32, 0, 3, 1, 16, 4, 8, 13, 0, 2, 40, 1, 217, 74, 247, 250, 190, 74, + 247, 251, 190, 3, 1, 14, 16, 8, 13, 0, 32, 70, 5, 240, 187, 251, 76, + 247, 6, 184, 3, 1, 18, 26, 8, 13, 0, 32, 70, 41, 70, 5, 76, 252, 255, + 168, 57, 33, 0, 240, 208, 251, 189, 232, 240, 129, 0, 0, 3, 1, 20, 40, + 8, 13, 0, 42, 32, 32, 98, 32, 70, 5, 240, 239, 251, 2, 40, 74, 247, + 35, 190, 3, 1, 132, 1, 56, 8, 13, 0, 112, 181, 4, 70, 92, 247, 8, 248, + 23, 77, 149, 248, 216, 1, 56, 179, 22, 72, 23, 74, 65, 104, 65, 243, + 128, 16, 64, 28, 16, 96, 196, 235, 4, 16, 20, 74, 0, 235, 132, 16, 2, + 235, 128, 0, 144, 248, 192, 32, 17, 72, 7, 42, 22, 208, 17, 74, 18, + 104, 82, 30, 2, 96, 32, 70, 197, 248, 12, 17, 91, 247, 159, 252, 116, + 247, 235, 253, 149, 248, 217, 17, 65, 240, 1, 1, 133, 248, 217, 17, + 116, 247, 231, 253, 0, 32, 112, 189, 3, 32, 112, 189, 1, 34, 233, 231, + 128, 1, 33, 0, 112, 29, 32, 0, 164, 53, 32, 0, 172, 117, 32, 0, 160, + 49, 32, 0, 168, 49, 32, 0, 3, 1, 68, 184, 8, 13, 0, 112, 181, 12, 70, + 176, 249, 32, 16, 64, 140, 21, 70, 30, 70, 8, 24, 11, 213, 64, 66, 25, + 70, 112, 247, 67, 250, 34, 70, 51, 70, 41, 70, 189, 232, 112, 64, 16, + 70, 112, 247, 61, 184, 25, 70, 112, 247, 56, 250, 34, 70, 51, 70, 41, + 70, 189, 232, 112, 64, 16, 70, 112, 247, 38, 185, 3, 1, 28, 248, 8, + 13, 0, 16, 181, 116, 247, 174, 76, 252, 255, 163, 58, 33, 0, 253, 4, + 70, 48, 247, 218, 252, 32, 70, 189, 232, 16, 64, 116, 247, 170, 189, + 0, 0, 3, 1, 40, 16, 9, 13, 0, 16, 181, 7, 75, 0, 34, 83, 248, 34, 64, + 140, 66, 2, 209, 64, 240, 3, 0, 16, 189, 82, 28, 10, 42, 245, 219, 64, + 240, 1, 0, 16, 189, 140, 96, 13, 0, 3, 1, 32, 52, 9, 13, 0, 65, 124, + 2, 41, 8, 208, 3, 41, 6, 208, 0, 124, 22, 40, 3, 208, 23, 40, 1, 208, + 0, 32, 112, 71, 1, 32, 112, 71, 3, 1, 132, 1, 80, 9, 13, 0, 45, 233, + 254, 67, 27, 76, 102, 120, 160, 120, 8, 177, 6, 70, 34, 224, 132, 247, + 228, 249, 8, 177, 38, 120, 29, 224, 23, 72, 0, 37, 160, 70, 208, 233, + 0, 18, 128, 104, 0, 145, 205, 233, 1, 32, 111, 70, 87, 248, 37, 0, 4, + 104, 7, 224, 32, 31, 255, 247, 212, 255, 16, 177, 152, 248, 0, 96, 4, + 224, 36, 104, 87, 248, 37, 0, 160, 66, 243, 209, 109, 28, 237, 178, + 3, 45, 235, 211, 9, 72, 1, 120, 142, 66, 7, 208, 6, 112, 3, 176, 49, + 70, 189, 232, 240, 67, 2, 32, 116, 247, 94, 188, 189, 232, 254, 131, + 0, 0, 49, 10, 33, 0, 124, 96, 13, 0, 180, 96, 13, 0, 3, 1, 18, 208, + 9, 13, 0, 47, 72, 0, 33, 1, 97, 65, 97, 129, 97, 193, 76, 252, 255, + 158, 59, 33, 0, 97, 112, 71, 3, 1, 26, 222, 9, 13, 0, 0, 32, 43, 75, + 1, 70, 16, 51, 83, 248, 33, 32, 73, 28, 16, 67, 4, 41, 249, 211, 112, + 71, 3, 1, 144, 1, 244, 9, 13, 0, 254, 181, 38, 78, 4, 0, 31, 70, 79, + 240, 0, 5, 6, 241, 16, 6, 4, 208, 1, 44, 2, 208, 2, 40, 45, 208, 52, + 224, 16, 104, 0, 144, 144, 136, 173, 248, 4, 0, 2, 170, 104, 70, 113, + 247, 117, 255, 28, 73, 9, 120, 136, 66, 39, 210, 128, 40, 37, 210, 65, + 9, 0, 240, 31, 0, 1, 34, 86, 248, 33, 48, 2, 250, 0, 242, 12, 177, 147, + 67, 15, 224, 19, 66, 1, 208, 23, 37, 23, 224, 223, 248, 64, 192, 7, + 240, 1, 7, 135, 64, 92, 248, 33, 64, 148, 67, 60, 67, 76, 248, 33, 64, + 19, 67, 70, 248, 33, 48, 8, 224, 0, 32, 1, 70, 70, 248, 32, 16, 64, + 28, 4, 40, 250, 211, 0, 224, 18, 37, 40, 70, 254, 189, 3, 1, 28, 128, + 10, 13, 0, 0, 40, 4, 208, 9, 56, 32, 240, 3, 0, 116, 247, 144, 190, + 112, 71, 52, 106, 13, 0, 75, 41, 32, 0, 3, 1, 200, 1, 152, 10, 13, 0, + 45, 233, 240, 71, 4, 70, 144, 248, 210, 0, 0, 240, 87, 250, 6, 70, 180, + 248, 72, 0, 180, 248, 74, 16, 136, 66, 3, 208, 148, 248, 32, 33, 76, + 252, 255, 153, 60, 33, 0, 167, 247, 248, 254, 69, 0, 53, 128, 74, 208, + 180, 248, 34, 17, 32, 70, 100, 247, 53, 250, 130, 70, 32, 108, 0, 38, + 32, 244, 128, 32, 79, 246, 255, 121, 32, 100, 4, 235, 70, 7, 183, 248, + 40, 1, 72, 69, 55, 208, 65, 0, 80, 70, 111, 247, 132, 255, 176, 251, + 245, 241, 128, 70, 5, 251, 17, 128, 167, 248, 40, 1, 95, 234, 72, 16, + 21, 212, 148, 248, 210, 0, 102, 247, 162, 249, 64, 1, 32, 213, 79, 240, + 128, 96, 176, 251, 245, 241, 105, 67, 64, 70, 112, 247, 243, 248, 176, + 251, 245, 241, 5, 251, 17, 1, 167, 248, 40, 17, 64, 1, 16, 213, 183, + 248, 40, 1, 2, 35, 42, 70, 0, 33, 99, 247, 135, 254, 167, 248, 40, 1, + 1, 32, 176, 64, 33, 108, 192, 243, 0, 0, 65, 234, 128, 64, 32, 100, + 118, 28, 6, 46, 193, 211, 189, 232, 240, 135, 3, 1, 72, 92, 11, 13, + 0, 14, 181, 9, 41, 141, 248, 0, 16, 19, 208, 13, 73, 10, 104, 205, 248, + 1, 32, 73, 104, 205, 248, 5, 16, 157, 248, 4, 16, 9, 34, 33, 240, 8, + 1, 141, 248, 4, 16, 144, 248, 210, 0, 105, 70, 178, 247, 135, 254, 14, + 189, 208, 248, 176, 16, 205, 248, 1, 16, 208, 248, 180, 16, 233, 231, + 16, 130, 32, 0, 3, 1, 150, 3, 160, 11, 13, 0, 45, 233, 252, 95, 76, + 252, 255, 148, 61, 33, 0, 6, 70, 128, 120, 214, 248, 4, 160, 241, 120, + 0, 240, 15, 4, 10, 235, 1, 0, 79, 240, 0, 8, 199, 121, 180, 72, 223, + 248, 212, 178, 1, 37, 0, 120, 193, 70, 72, 185, 4, 44, 7, 208, 174, + 247, 75, 250, 32, 177, 219, 248, 0, 0, 0, 33, 128, 248, 252, 17, 167, + 247, 211, 250, 1, 40, 1, 209, 248, 7, 100, 209, 174, 247, 61, 250, 0, + 40, 96, 208, 167, 72, 0, 120, 48, 185, 4, 44, 4, 209, 219, 248, 0, 0, + 144, 248, 252, 1, 112, 187, 247, 120, 81, 70, 4, 44, 26, 209, 219, 248, + 0, 16, 58, 70, 1, 245, 129, 112, 205, 233, 0, 1, 81, 70, 116, 247, 1, + 254, 219, 248, 0, 16, 0, 152, 10, 122, 1, 153, 56, 68, 82, 28, 9, 49, + 116, 247, 247, 253, 219, 248, 0, 16, 8, 122, 1, 245, 129, 113, 56, 68, + 199, 178, 146, 72, 0, 120, 0, 40, 176, 120, 64, 234, 7, 32, 29, 208, + 1, 240, 30, 251, 197, 178, 143, 72, 36, 177, 6, 44, 2, 208, 4, 44, 5, + 208, 38, 224, 5, 112, 48, 70, 162, 247, 206, 255, 33, 224, 0, 120, 133, + 66, 30, 208, 37, 234, 0, 1, 17, 240, 3, 8, 69, 234, 0, 5, 23, 208, 128, + 69, 21, 208, 79, 240, 1, 9, 18, 224, 174, 247, 248, 248, 240, 177, 1, + 32, 36, 177, 6, 44, 2, 208, 4, 44, 5, 76, 252, 255, 143, 62, 33, 0, + 208, 6, 224, 219, 248, 0, 16, 129, 248, 252, 1, 1, 224, 79, 240, 1, + 9, 122, 73, 8, 112, 122, 79, 56, 104, 192, 5, 21, 213, 186, 241, 0, + 15, 18, 208, 120, 72, 128, 122, 192, 6, 14, 213, 48, 70, 162, 247, 134, + 255, 45, 224, 167, 247, 11, 251, 1, 40, 41, 209, 12, 177, 6, 44, 38, + 209, 48, 70, 162, 247, 146, 255, 34, 224, 1, 44, 3, 209, 48, 70, 162, + 247, 93, 255, 176, 177, 185, 241, 0, 15, 10, 208, 95, 234, 200, 112, + 7, 208, 105, 72, 0, 120, 16, 177, 104, 72, 176, 247, 245, 254, 162, + 247, 52, 255, 95, 72, 0, 120, 16, 177, 85, 177, 232, 7, 8, 208, 1, 32, + 189, 232, 252, 159, 56, 104, 64, 5, 2, 213, 48, 70, 161, 247, 199, 253, + 0, 32, 245, 231, 3, 1, 42, 50, 13, 13, 0, 16, 181, 10, 224, 93, 72, + 137, 247, 18, 255, 4, 70, 64, 104, 8, 177, 116, 247, 52, 253, 32, 70, + 116, 247, 49, 253, 87, 72, 137, 247, 250, 254, 0, 40, 239, 208, 16, + 189, 3, 1, 28, 88, 13, 13, 0, 16, 181, 4, 70, 139, 247, 135, 252, 0, + 40, 4, 209, 96, 104, 189, 232, 16, 64, 116, 247, 32, 189, 16, 189, 3, + 1, 16, 112, 13, 13, 0, 1, 40, 1, 208, 0, 240, 221, 184, 0, 240, 162, + 184, 3, 1, 200, 2, 124, 13, 13, 0, 45, 76, 252, 255, 138, 63, 33, 0, + 233, 240, 95, 0, 38, 128, 70, 15, 70, 52, 70, 172, 247, 4, 250, 88, + 177, 0, 37, 95, 234, 8, 0, 9, 208, 1, 40, 15, 208, 16, 40, 21, 208, + 184, 241, 17, 15, 64, 209, 24, 224, 1, 37, 242, 231, 167, 247, 151, + 250, 129, 70, 21, 32, 163, 247, 201, 251, 6, 70, 10, 224, 173, 247, + 87, 252, 129, 70, 20, 32, 163, 247, 193, 251, 6, 70, 3, 224, 167, 247, + 135, 250, 129, 70, 60, 70, 185, 241, 0, 15, 38, 208, 24, 240, 240, 15, + 223, 248, 208, 160, 223, 248, 208, 176, 223, 248, 208, 128, 223, 248, + 208, 144, 29, 208, 152, 248, 0, 0, 70, 70, 1, 40, 22, 209, 20, 177, + 13, 177, 171, 247, 190, 255, 79, 70, 185, 248, 0, 0, 167, 247, 175, + 249, 186, 248, 0, 0, 167, 247, 175, 249, 52, 177, 56, 136, 224, 131, + 29, 177, 155, 248, 11, 0, 171, 247, 221, 255, 0, 32, 48, 112, 189, 232, + 240, 159, 0, 46, 251, 208, 173, 247, 103, 252, 6, 70, 167, 247, 160, + 249, 6, 251, 0, 247, 167, 247, 160, 249, 6, 70, 173, 247, 101, 252, + 70, 67, 183, 66, 236, 217, 167, 247, 152, 249, 170, 248, 0, 0, 167, + 247, 144, 249, 169, 248, 0, 0, 20, 177, 13, 177, 171, 247, 140, 255, + 173, 247, 84, 252, 167, 247, 126, 249, 173, 247, 72, 252, 167, 247, + 126, 249, 60, 177, 173, 247, 76, 252, 255, 133, 64, 33, 0, 75, 252, + 224, 131, 29, 177, 155, 248, 11, 0, 171, 247, 171, 255, 1, 33, 136, + 248, 0, 16, 203, 231, 0, 0, 72, 97, 13, 0, 0, 51, 32, 0, 181, 96, 13, + 0, 245, 50, 32, 0, 156, 41, 32, 0, 88, 52, 32, 0, 144, 149, 32, 0, 252, + 136, 32, 0, 58, 51, 32, 0, 248, 91, 32, 0, 56, 51, 32, 0, 60, 51, 32, + 0, 3, 1, 118, 192, 14, 13, 0, 16, 181, 161, 247, 75, 253, 31, 72, 0, + 104, 128, 5, 1, 213, 160, 247, 133, 255, 167, 247, 89, 249, 1, 40, 1, + 209, 169, 247, 231, 248, 0, 33, 1, 32, 255, 247, 75, 255, 171, 247, + 31, 255, 23, 72, 23, 73, 0, 120, 0, 40, 8, 104, 2, 208, 64, 244, 0, + 112, 1, 224, 32, 244, 0, 112, 8, 96, 116, 247, 170, 250, 4, 70, 173, + 247, 176, 251, 96, 177, 173, 247, 7, 252, 72, 185, 20, 32, 163, 247, + 23, 251, 40, 177, 6, 32, 173, 247, 169, 251, 11, 73, 1, 32, 8, 112, + 32, 70, 189, 232, 16, 64, 116, 247, 152, 186, 3, 1, 38, 50, 15, 13, + 0, 16, 181, 167, 247, 133, 249, 0, 33, 189, 232, 16, 64, 17, 32, 255, + 247, 28, 191, 156, 41, 32, 0, 241, 50, 32, 0, 252, 50, 32, 0, 243, 50, + 32, 0, 3, 1, 32, 84, 15, 13, 0, 4, 73, 9, 120, 136, 66, 3, 210, 3, 73, + 76, 252, 255, 128, 65, 33, 0, 1, 235, 64, 0, 112, 71, 0, 32, 112, 71, + 73, 41, 32, 0, 84, 106, 13, 0, 3, 1, 12, 112, 15, 13, 0, 56, 73, 55, + 72, 8, 96, 112, 71, 3, 1, 20, 120, 15, 13, 0, 1, 41, 3, 209, 79, 244, + 72, 19, 16, 34, 218, 101, 101, 247, 217, 189, 3, 1, 32, 136, 15, 13, + 0, 193, 123, 57, 185, 144, 248, 139, 16, 138, 6, 5, 213, 33, 240, 32, + 1, 128, 248, 139, 16, 1, 32, 112, 71, 0, 32, 112, 71, 3, 1, 30, 164, + 15, 13, 0, 193, 123, 0, 41, 8, 209, 144, 248, 29, 17, 1, 41, 4, 209, + 16, 248, 139, 31, 65, 240, 32, 1, 1, 112, 112, 71, 3, 1, 86, 190, 15, + 13, 0, 16, 181, 4, 70, 100, 247, 90, 248, 212, 248, 212, 0, 1, 33, 173, + 247, 64, 250, 212, 248, 216, 0, 1, 33, 173, 247, 59, 250, 32, 109, 30, + 74, 144, 248, 210, 16, 1, 32, 19, 104, 136, 64, 131, 67, 19, 96, 27, + 74, 19, 104, 131, 67, 19, 96, 26, 75, 26, 104, 130, 67, 8, 70, 26, 96, + 70, 247, 1, 255, 32, 70, 189, 232, 16, 64, 79, 244, 172, 113, 116, 247, + 240, 185, 3, 1, 36, 16, 16, 13, 0, 16, 181, 4, 70, 101, 247, 248, 253, + 224, 123, 0, 40, 7, 209, 17, 72, 1, 104, 17, 74, 33, 240, 255, 1, 18, + 120, 17, 67, 1, 96, 16, 76, 252, 255, 123, 66, 33, 0, 189, 3, 1, 64, + 48, 16, 13, 0, 16, 181, 4, 70, 100, 247, 194, 255, 224, 123, 1, 40, + 7, 209, 9, 72, 1, 104, 9, 74, 33, 240, 255, 1, 18, 120, 17, 67, 1, 96, + 16, 189, 184, 96, 13, 0, 44, 41, 32, 0, 48, 41, 32, 0, 52, 41, 32, 0, + 56, 41, 32, 0, 144, 139, 49, 0, 40, 37, 32, 0, 3, 1, 116, 108, 16, 13, + 0, 112, 181, 4, 70, 174, 247, 120, 250, 8, 177, 64, 38, 0, 224, 0, 38, + 106, 247, 249, 254, 16, 185, 106, 247, 48, 255, 0, 179, 0, 37, 148, + 248, 39, 0, 49, 70, 3, 40, 30, 208, 12, 32, 110, 247, 59, 255, 148, + 248, 39, 32, 196, 72, 1, 42, 194, 73, 2, 104, 2, 234, 1, 2, 2, 96, 1, + 104, 18, 208, 192, 74, 17, 67, 1, 96, 29, 177, 160, 123, 111, 247, 156, + 254, 160, 97, 32, 70, 189, 232, 112, 64, 164, 247, 118, 188, 106, 247, + 84, 249, 1, 37, 219, 231, 13, 32, 223, 231, 65, 240, 128, 113, 235, + 231, 3, 1, 16, 220, 16, 13, 0, 182, 73, 8, 112, 182, 73, 1, 32, 8, 112, + 112, 71, 3, 1, 160, 2, 232, 16, 13, 0, 45, 233, 240, 65, 180, 77, 6, + 70, 12, 70, 41, 120, 255, 32, 6, 241, 28, 7, 1, 41, 2, 209, 56, 70, + 105, 247, 166, 250, 175, 73, 10, 104, 66, 240, 0, 82, 10, 76, 252, 255, + 118, 67, 33, 0, 96, 174, 73, 188, 177, 1, 44, 62, 208, 2, 44, 74, 208, + 3, 44, 85, 208, 4, 44, 94, 208, 5, 44, 108, 209, 150, 248, 39, 0, 1, + 40, 104, 208, 48, 70, 106, 247, 235, 252, 0, 40, 99, 208, 48, 70, 189, + 232, 240, 65, 164, 247, 252, 187, 42, 120, 1, 42, 14, 209, 255, 40, + 12, 208, 9, 120, 193, 177, 192, 243, 3, 17, 8, 41, 6, 209, 0, 240, 15, + 0, 0, 240, 166, 250, 192, 178, 255, 247, 187, 255, 107, 247, 131, 249, + 120, 177, 111, 247, 33, 250, 176, 66, 11, 209, 111, 247, 100, 251, 64, + 177, 189, 232, 240, 65, 111, 247, 98, 184, 146, 73, 1, 235, 128, 0, + 0, 104, 233, 231, 48, 70, 189, 232, 240, 65, 107, 231, 9, 120, 0, 41, + 50, 208, 41, 120, 1, 41, 47, 209, 192, 243, 3, 17, 8, 41, 43, 209, 0, + 240, 15, 0, 1, 33, 35, 224, 56, 70, 105, 247, 127, 249, 16, 177, 4, + 32, 168, 247, 119, 255, 132, 72, 0, 120, 189, 232, 240, 65, 168, 247, + 0, 191, 41, 120, 1, 41, 23, 209, 255, 40, 21, 208, 127, 72, 0, 104, + 189, 232, 240, 65, 192, 178, 125, 231, 9, 120, 0, 41, 12, 208, 41, 120, + 1, 41, 9, 209, 192, 243, 3, 16, 8, 40, 5, 209, 0, 33, 8, 70, 189, 232, + 240, 65, 0, 240, 48, 186, 189, 232, 240, 129, 3, 1, 30, 4, 76, 252, + 255, 113, 68, 33, 0, 18, 13, 0, 16, 181, 44, 34, 115, 73, 116, 72, 137, + 247, 190, 252, 175, 242, 43, 17, 113, 72, 1, 97, 113, 73, 8, 96, 16, + 189, 3, 1, 114, 30, 18, 13, 0, 45, 233, 240, 65, 3, 70, 8, 70, 255, + 41, 234, 208, 0, 34, 255, 38, 0, 241, 70, 1, 108, 77, 23, 70, 3, 235, + 67, 4, 90, 41, 11, 216, 98, 73, 9, 120, 65, 177, 0, 240, 234, 249, 41, + 104, 64, 240, 128, 0, 1, 235, 132, 1, 136, 113, 212, 231, 223, 248, + 116, 225, 111, 240, 24, 12, 14, 235, 130, 1, 9, 104, 12, 235, 65, 1, + 73, 178, 67, 26, 0, 213, 11, 26, 217, 178, 177, 66, 1, 216, 23, 70, + 14, 70, 82, 28, 210, 178, 5, 42, 237, 211, 40, 104, 0, 235, 132, 0, + 135, 113, 185, 231, 3, 1, 10, 140, 18, 13, 0, 74, 72, 0, 120, 112, 71, + 3, 1, 226, 2, 146, 18, 13, 0, 45, 233, 240, 65, 5, 70, 64, 108, 113, + 247, 72, 249, 4, 0, 174, 208, 148, 248, 208, 0, 1, 33, 159, 247, 80, + 254, 148, 248, 208, 0, 164, 247, 189, 252, 5, 241, 28, 0, 1, 33, 7, + 70, 105, 247, 231, 249, 1, 33, 56, 70, 105, 247, 229, 249, 0, 33, 56, + 70, 105, 247, 24, 249, 69, 72, 0, 104, 32, 101, 68, 72, 0, 29, 0, 104, + 67, 73, 164, 248, 84, 0, 65, 72, 9, 104, 76, 252, 255, 108, 69, 33, + 0, 12, 48, 193, 243, 128, 17, 132, 248, 86, 16, 149, 248, 40, 16, 132, + 248, 87, 16, 0, 104, 59, 78, 96, 99, 16, 54, 174, 247, 62, 249, 96, + 177, 57, 72, 20, 48, 0, 104, 192, 5, 7, 213, 48, 104, 160, 99, 54, 29, + 104, 108, 113, 247, 9, 249, 174, 247, 141, 249, 20, 34, 49, 70, 32, + 70, 163, 247, 249, 251, 224, 136, 0, 179, 97, 137, 241, 177, 64, 0, + 164, 248, 198, 0, 148, 248, 208, 0, 111, 247, 73, 253, 161, 136, 1, + 37, 137, 0, 9, 29, 111, 247, 174, 250, 79, 234, 80, 0, 196, 248, 204, + 0, 65, 1, 25, 213, 180, 248, 198, 16, 128, 240, 128, 96, 176, 251, 241, + 242, 1, 251, 18, 0, 164, 248, 196, 0, 2, 32, 22, 224, 0, 33, 56, 70, + 105, 247, 139, 249, 0, 33, 56, 70, 105, 247, 137, 249, 1, 33, 56, 70, + 105, 247, 188, 248, 0, 32, 57, 231, 180, 248, 198, 16, 176, 251, 241, + 242, 1, 251, 18, 0, 164, 248, 196, 0, 0, 32, 132, 248, 212, 0, 224, + 120, 0, 185, 229, 112, 1, 32, 41, 231, 255, 255, 0, 254, 148, 131, 49, + 0, 0, 0, 1, 1, 165, 7, 32, 0, 44, 100, 13, 0, 36, 51, 32, 0, 0, 4, 32, + 0, 52, 10, 33, 0, 152, 50, 32, 0, 60, 29, 32, 0, 136, 50, 32, 0, 184, + 163, 8, 0, 84, 107, 13, 0, 140, 76, 252, 255, 103, 70, 33, 0, 50, 32, + 0, 132, 50, 32, 0, 0, 10, 55, 0, 152, 139, 49, 0, 3, 1, 14, 240, 19, + 13, 0, 20, 73, 19, 72, 8, 96, 255, 247, 235, 186, 3, 1, 42, 250, 19, + 13, 0, 16, 181, 4, 70, 166, 247, 21, 253, 173, 247, 141, 249, 1, 40, + 9, 209, 255, 247, 232, 250, 0, 40, 5, 208, 161, 109, 32, 70, 189, 232, + 16, 64, 0, 240, 121, 184, 16, 189, 3, 1, 48, 32, 20, 13, 0, 16, 181, + 12, 70, 166, 247, 212, 253, 0, 44, 8, 209, 255, 247, 215, 250, 0, 40, + 4, 208, 4, 72, 1, 104, 33, 244, 128, 17, 1, 96, 16, 189, 228, 96, 13, + 0, 184, 50, 32, 0, 108, 139, 49, 0, 3, 1, 12, 76, 20, 13, 0, 43, 73, + 42, 72, 8, 96, 112, 71, 3, 1, 66, 84, 20, 13, 0, 16, 181, 4, 70, 172, + 247, 151, 248, 176, 247, 134, 248, 104, 177, 173, 247, 93, 249, 1, 40, + 9, 209, 255, 247, 184, 250, 48, 177, 35, 72, 129, 109, 32, 70, 189, + 232, 16, 64, 0, 240, 73, 184, 148, 248, 74, 0, 4, 40, 4, 209, 31, 72, + 1, 104, 65, 244, 128, 17, 1, 96, 16, 189, 3, 1, 44, 146, 20, 13, 0, + 16, 181, 12, 70, 172, 247, 186, 249, 0, 44, 12, 209, 176, 247, 101, + 248, 0, 40, 8, 208, 255, 247, 154, 250, 0, 40, 4, 208, 21, 72, 1, 104, + 76, 252, 255, 98, 71, 33, 0, 33, 244, 128, 17, 1, 96, 16, 189, 3, 1, + 90, 186, 20, 13, 0, 16, 181, 4, 70, 192, 140, 176, 245, 0, 111, 9, 209, + 161, 247, 6, 248, 56, 177, 14, 72, 225, 140, 0, 104, 176, 248, 112, + 0, 7, 224, 224, 131, 16, 189, 158, 247, 122, 249, 64, 177, 10, 72, 225, + 140, 0, 143, 8, 26, 161, 140, 136, 66, 243, 218, 8, 70, 241, 231, 224, + 140, 239, 231, 16, 97, 13, 0, 204, 50, 32, 0, 252, 238, 32, 0, 108, + 139, 49, 0, 212, 48, 32, 0, 228, 87, 32, 0, 3, 1, 212, 1, 16, 21, 13, + 0, 16, 181, 11, 70, 134, 176, 4, 70, 145, 248, 86, 16, 4, 170, 3, 241, + 80, 0, 113, 247, 243, 249, 41, 73, 9, 120, 136, 66, 36, 210, 128, 40, + 34, 210, 39, 74, 65, 9, 0, 240, 31, 0, 82, 248, 33, 32, 1, 35, 131, + 64, 26, 66, 24, 208, 35, 74, 82, 248, 33, 16, 34, 124, 193, 64, 1, 240, + 1, 0, 32, 73, 1, 40, 38, 208, 21, 42, 10, 104, 44, 208, 34, 244, 128, + 2, 10, 96, 113, 247, 51, 249, 27, 74, 1, 104, 72, 50, 17, 96, 17, 29, + 128, 136, 8, 96, 24, 72, 1, 104, 0, 145, 64, 104, 1, 144, 160, 123, + 2, 169, 111, 247, 43, 252, 105, 70, 2, 168, 111, 247, 2, 252, 8, 48, + 140, 40, 19, 210, 15, 72, 0, 29, 1, 104, 76, 252, 255, 93, 72, 33, 0, + 65, 244, 128, 17, 1, 96, 6, 176, 16, 189, 21, 42, 10, 104, 2, 208, 66, + 244, 128, 2, 215, 231, 66, 240, 64, 2, 212, 231, 34, 240, 64, 2, 209, + 231, 110, 247, 121, 254, 0, 32, 173, 247, 175, 248, 235, 231, 75, 41, + 32, 0, 68, 106, 13, 0, 52, 106, 13, 0, 104, 139, 49, 0, 112, 130, 49, + 0, 3, 1, 64, 224, 21, 13, 0, 112, 181, 5, 70, 12, 70, 8, 10, 0, 33, + 159, 247, 195, 251, 0, 33, 4, 40, 4, 217, 149, 248, 208, 32, 146, 7, + 0, 213, 0, 31, 162, 7, 7, 208, 226, 67, 146, 7, 5, 209, 3, 74, 18, 120, + 144, 66, 0, 210, 0, 185, 1, 33, 8, 70, 112, 189, 44, 52, 32, 0, 3, 1, + 72, 28, 22, 13, 0, 43, 74, 0, 33, 82, 104, 193, 235, 193, 3, 2, 235, + 131, 3, 147, 249, 24, 48, 131, 66, 14, 220, 153, 177, 193, 235, 193, + 3, 2, 235, 131, 2, 146, 249, 24, 48, 18, 249, 4, 44, 195, 26, 16, 26, + 131, 66, 4, 221, 73, 30, 2, 224, 73, 28, 14, 41, 229, 219, 14, 41, 0, + 209, 13, 33, 72, 178, 112, 71, 3, 1, 80, 96, 22, 13, 0, 240, 181, 26, + 79, 58, 120, 138, 66, 31, 208, 255, 42, 1, 209, 0, 41, 27, 208, 23, + 76, 57, 112, 0, 34, 192, 235, 192, 6, 120, 104, 0, 235, 130, 3, 29, + 104, 76, 252, 255, 88, 73, 33, 0, 117, 177, 81, 177, 45, 104, 68, 248, + 34, 80, 0, 235, 134, 0, 0, 235, 130, 0, 27, 104, 192, 105, 24, 96, 2, + 224, 84, 248, 34, 0, 40, 96, 82, 28, 6, 42, 232, 219, 240, 189, 3, 1, + 48, 172, 22, 13, 0, 7, 73, 0, 240, 15, 0, 192, 235, 192, 0, 73, 104, + 1, 235, 128, 0, 5, 73, 192, 105, 0, 235, 64, 0, 8, 68, 208, 248, 2, + 0, 112, 71, 60, 97, 13, 0, 128, 107, 13, 0, 112, 9, 32, 0, 3, 1, 254, + 2, 216, 22, 13, 0, 45, 233, 255, 79, 131, 176, 255, 33, 0, 145, 6, 153, + 73, 177, 249, 73, 75, 120, 202, 104, 2, 235, 3, 18, 18, 104, 146, 7, + 31, 213, 12, 105, 18, 224, 245, 73, 12, 104, 33, 104, 137, 7, 11, 212, + 8, 42, 22, 210, 194, 235, 194, 1, 1, 235, 129, 1, 4, 235, 193, 1, 209, + 248, 108, 19, 137, 7, 12, 213, 4, 242, 45, 20, 111, 240, 5, 1, 1, 235, + 16, 40, 4, 158, 192, 243, 128, 16, 0, 39, 1, 144, 182, 29, 117, 224, + 254, 32, 7, 176, 189, 232, 240, 143, 49, 120, 0, 41, 113, 208, 72, 28, + 64, 69, 110, 220, 112, 120, 22, 40, 97, 209, 182, 248, 2, 176, 0, 34, + 112, 28, 75, 247, 254, 254, 129, 70, 1, 152, 148, 248, 44, 81, 64, 240, + 128, 10, 33, 224, 0, 45, 0, 218, 29, 37, 76, 252, 255, 83, 74, 33, 0, + 5, 235, 133, 0, 20, 248, 16, 32, 82, 69, 24, 209, 6, 153, 41, 177, 210, + 73, 9, 105, 1, 235, 64, 1, 73, 28, 5, 224, 208, 73, 9, 104, 1, 235, + 64, 1, 1, 245, 151, 113, 4, 235, 64, 0, 176, 248, 7, 32, 90, 69, 4, + 209, 6, 34, 4, 152, 112, 247, 118, 253, 240, 179, 148, 248, 44, 1, 109, + 30, 133, 66, 216, 209, 192, 178, 0, 235, 128, 0, 4, 235, 64, 1, 4, 152, + 127, 28, 2, 104, 193, 248, 1, 32, 128, 136, 161, 248, 5, 0, 148, 248, + 44, 1, 0, 235, 128, 0, 4, 248, 16, 160, 148, 248, 44, 1, 0, 235, 128, + 0, 4, 235, 64, 0, 160, 248, 7, 176, 148, 248, 44, 1, 0, 235, 128, 0, + 4, 235, 64, 0, 128, 248, 9, 144, 148, 248, 44, 1, 64, 28, 192, 178, + 132, 248, 44, 1, 30, 40, 2, 211, 0, 32, 132, 248, 44, 1, 22, 248, 1, + 11, 168, 235, 0, 1, 161, 241, 1, 8, 6, 68, 184, 241, 1, 15, 138, 220, + 143, 177, 0, 224, 1, 224, 255, 32, 130, 231, 5, 235, 133, 0, 4, 235, + 64, 0, 66, 122, 74, 69, 2, 209, 232, 178, 0, 144, 230, 231, 128, 248, + 9, 144, 127, 28, 226, 231, 0, 152, 114, 231, 3, 1, 68, 82, 24, 13, 0, + 45, 233, 240, 65, 157, 76, 160, 104, 184, 185, 167, 120, 230, 120, 184, + 1, 156, 77, 76, 252, 255, 78, 75, 33, 0, 0, 235, 6, 17, 1, 242, 49, + 17, 40, 70, 115, 247, 191, 253, 5, 235, 135, 16, 1, 29, 196, 233, 2, + 81, 0, 235, 6, 16, 1, 29, 33, 97, 148, 73, 0, 242, 49, 16, 8, 96, 1, + 32, 189, 232, 240, 129, 3, 1, 90, 146, 24, 13, 0, 48, 181, 141, 75, + 66, 121, 197, 136, 220, 104, 209, 178, 4, 235, 1, 17, 37, 177, 13, 96, + 5, 137, 13, 129, 133, 122, 4, 224, 79, 244, 0, 69, 13, 96, 0, 37, 13, + 129, 141, 114, 4, 235, 2, 17, 197, 122, 205, 114, 2, 123, 10, 115, 2, + 123, 1, 42, 9, 209, 176, 248, 13, 32, 138, 128, 194, 123, 74, 115, 2, + 124, 138, 115, 176, 248, 17, 0, 200, 128, 24, 120, 64, 28, 24, 112, + 48, 189, 3, 1, 90, 232, 24, 13, 0, 240, 181, 223, 248, 224, 225, 68, + 121, 0, 38, 222, 248, 12, 0, 0, 235, 4, 16, 1, 104, 41, 177, 158, 248, + 0, 16, 73, 30, 142, 248, 0, 16, 6, 96, 0, 32, 1, 37, 17, 224, 222, 248, + 8, 16, 5, 250, 4, 247, 1, 235, 128, 18, 19, 108, 59, 66, 6, 208, 187, + 67, 19, 100, 3, 209, 22, 113, 10, 120, 82, 30, 10, 112, 64, 28, 192, + 178, 158, 248, 2, 16, 136, 66, 233, 211, 240, 189, 3, 1, 240, 1, 62, + 25, 13, 0, 45, 233, 255, 79, 128, 70, 0, 36, 129, 176, 145, 76, 252, + 255, 73, 76, 33, 0, 70, 16, 6, 2, 213, 6, 32, 0, 144, 1, 224, 205, 248, + 0, 144, 92, 73, 254, 39, 0, 38, 141, 104, 186, 70, 45, 29, 1, 32, 0, + 250, 3, 251, 34, 224, 40, 120, 208, 177, 186, 241, 253, 15, 11, 208, + 72, 69, 9, 209, 149, 248, 59, 16, 65, 69, 5, 209, 104, 28, 0, 154, 2, + 153, 112, 247, 134, 252, 8, 177, 64, 53, 13, 224, 232, 107, 16, 234, + 11, 15, 2, 208, 79, 240, 253, 10, 65, 224, 55, 70, 44, 70, 12, 224, + 143, 66, 1, 211, 55, 70, 44, 70, 118, 28, 246, 178, 70, 72, 129, 120, + 142, 66, 216, 211, 186, 241, 253, 15, 49, 208, 66, 72, 129, 120, 143, + 66, 45, 210, 100, 179, 132, 248, 0, 144, 132, 248, 59, 128, 225, 107, + 25, 185, 128, 104, 1, 120, 73, 28, 1, 112, 225, 107, 96, 28, 65, 234, + 11, 1, 225, 99, 0, 154, 2, 153, 115, 247, 26, 255, 2, 154, 184, 241, + 2, 15, 2, 235, 9, 1, 9, 208, 184, 241, 3, 15, 6, 208, 184, 241, 5, 15, + 7, 208, 184, 241, 6, 15, 4, 208, 8, 224, 4, 241, 17, 0, 0, 154, 2, 224, + 4, 241, 30, 0, 0, 154, 115, 247, 1, 255, 186, 70, 80, 70, 5, 176, 135, + 230, 3, 1, 146, 1, 42, 26, 13, 0, 45, 233, 255, 95, 0, 38, 144, 70, + 16, 6, 2, 213, 79, 240, 6, 11, 0, 224, 76, 252, 255, 68, 77, 33, 0, + 195, 70, 35, 73, 255, 39, 0, 37, 140, 104, 138, 70, 36, 29, 1, 32, 0, + 250, 3, 249, 26, 224, 32, 120, 168, 177, 255, 47, 19, 209, 64, 69, 17, + 209, 148, 248, 59, 16, 0, 152, 129, 66, 12, 209, 90, 70, 96, 28, 1, + 153, 112, 247, 19, 252, 48, 185, 224, 107, 16, 234, 9, 15, 2, 208, 47, + 70, 38, 70, 6, 224, 64, 52, 109, 28, 237, 178, 154, 248, 2, 0, 133, + 66, 224, 211, 154, 248, 2, 0, 81, 70, 135, 66, 10, 210, 78, 177, 240, + 107, 48, 234, 9, 0, 240, 99, 4, 209, 48, 112, 136, 104, 1, 120, 73, + 30, 1, 112, 4, 176, 56, 70, 189, 232, 240, 159, 3, 1, 88, 184, 26, 13, + 0, 240, 181, 4, 77, 0, 35, 1, 36, 170, 104, 31, 70, 18, 29, 140, 64, + 28, 224, 0, 0, 68, 97, 13, 0, 28, 52, 32, 0, 181, 107, 13, 0, 0, 51, + 32, 0, 146, 248, 59, 16, 129, 66, 12, 209, 17, 120, 81, 177, 209, 107, + 33, 66, 7, 208, 161, 67, 209, 99, 4, 209, 23, 112, 169, 104, 14, 120, + 118, 30, 14, 112, 64, 50, 91, 28, 219, 178, 169, 120, 139, 66, 232, + 211, 240, 189, 3, 1, 88, 12, 27, 13, 0, 45, 233, 240, 71, 250, 79, 129, + 70, 65, 240, 128, 6, 188, 104, 79, 240, 1, 8, 36, 29, 0, 37, 21, 224, + 148, 248, 59, 0, 128, 76, 252, 255, 63, 78, 33, 0, 185, 32, 120, 176, + 66, 1, 208, 130, 40, 11, 209, 122, 120, 225, 107, 8, 250, 2, 240, 1, + 66, 5, 208, 6, 34, 97, 28, 72, 70, 112, 247, 167, 251, 56, 177, 64, + 52, 109, 28, 184, 120, 133, 66, 230, 211, 255, 32, 189, 232, 240, 135, + 232, 178, 251, 231, 3, 1, 206, 1, 96, 27, 13, 0, 45, 233, 240, 67, 146, + 248, 0, 128, 137, 176, 84, 28, 7, 70, 21, 70, 14, 70, 233, 70, 65, 69, + 25, 209, 79, 240, 0, 0, 74, 70, 15, 224, 5, 235, 0, 1, 59, 92, 145, + 248, 17, 192, 3, 234, 12, 3, 19, 84, 35, 92, 73, 124, 3, 234, 1, 3, + 35, 84, 0, 241, 1, 0, 192, 178, 176, 66, 237, 211, 50, 70, 33, 70, 72, + 70, 57, 224, 24, 210, 67, 70, 74, 70, 56, 70, 173, 247, 106, 252, 0, + 32, 74, 70, 10, 224, 41, 24, 19, 92, 78, 124, 51, 64, 19, 84, 35, 92, + 73, 124, 11, 64, 35, 84, 64, 28, 192, 178, 65, 70, 64, 69, 241, 211, + 10, 70, 33, 70, 30, 224, 11, 70, 74, 70, 65, 70, 32, 70, 173, 247, 80, + 252, 51, 70, 4, 170, 65, 70, 5, 241, 17, 0, 0, 240, 165, 251, 0, 32, + 76, 70, 4, 173, 191, 75, 8, 224, 58, 92, 41, 92, 10, 64, 26, 84, 34, + 92, 10, 64, 34, 84, 64, 28, 192, 178, 176, 66, 244, 211, 185, 73, 76, + 252, 255, 58, 79, 33, 0, 50, 70, 104, 70, 112, 247, 58, 251, 9, 176, + 189, 232, 240, 131, 3, 1, 154, 2, 42, 28, 13, 0, 45, 233, 243, 95, 129, + 70, 178, 72, 0, 38, 55, 70, 132, 104, 153, 248, 0, 0, 36, 29, 3, 40, + 3, 210, 0, 32, 1, 70, 189, 232, 252, 159, 153, 248, 1, 0, 79, 240, 1, + 11, 7, 40, 22, 208, 8, 220, 160, 241, 2, 0, 5, 40, 102, 210, 223, 232, + 0, 240, 12, 12, 14, 14, 16, 0, 20, 40, 6, 208, 21, 40, 8, 208, 22, 40, + 59, 208, 31, 40, 89, 209, 1, 224, 2, 32, 2, 224, 4, 32, 0, 224, 16, + 32, 130, 70, 0, 32, 40, 224, 155, 72, 132, 104, 36, 29, 0, 37, 28, 224, + 33, 120, 185, 177, 148, 248, 59, 32, 1, 153, 138, 66, 18, 209, 66, 120, + 225, 107, 11, 250, 2, 240, 1, 66, 12, 208, 9, 235, 8, 0, 128, 28, 34, + 70, 81, 70, 255, 247, 81, 255, 32, 185, 11, 250, 5, 240, 6, 67, 71, + 234, 224, 119, 64, 52, 109, 28, 237, 178, 138, 72, 129, 120, 141, 66, + 222, 211, 8, 235, 10, 0, 192, 178, 153, 248, 0, 16, 128, 70, 161, 235, + 10, 1, 65, 69, 207, 220, 31, 224, 0, 37, 223, 248, 8, 130, 23, 224, + 33, 120, 145, 177, 148, 248, 59, 32, 1, 153, 138, 66, 13, 209, 152, + 248, 1, 32, 225, 107, 11, 250, 2, 240, 1, 76, 252, 255, 53, 80, 33, + 0, 66, 6, 208, 34, 70, 2, 33, 9, 241, 2, 0, 255, 247, 33, 255, 72, 177, + 64, 52, 109, 28, 237, 178, 152, 248, 2, 16, 141, 66, 227, 211, 48, 70, + 57, 70, 136, 231, 11, 250, 5, 240, 193, 23, 6, 67, 15, 67, 246, 231, + 3, 1, 34, 64, 29, 13, 0, 11, 70, 192, 243, 128, 17, 109, 72, 194, 104, + 64, 120, 2, 235, 0, 16, 0, 104, 192, 7, 1, 208, 24, 70, 216, 230, 254, + 32, 112, 71, 3, 1, 74, 94, 29, 13, 0, 240, 181, 102, 77, 132, 70, 0, + 32, 170, 104, 108, 120, 18, 29, 79, 240, 1, 14, 1, 70, 3, 70, 14, 250, + 4, 246, 175, 120, 16, 224, 20, 120, 92, 177, 146, 248, 59, 64, 100, + 69, 7, 209, 213, 107, 53, 66, 4, 208, 14, 250, 3, 244, 32, 67, 65, 234, + 228, 113, 64, 50, 91, 28, 219, 178, 187, 66, 236, 211, 240, 189, 3, + 1, 172, 2, 164, 29, 13, 0, 45, 233, 248, 79, 15, 70, 250, 33, 1, 235, + 16, 32, 69, 178, 0, 32, 128, 70, 130, 70, 6, 70, 129, 70, 79, 72, 79, + 73, 28, 70, 192, 104, 73, 120, 2, 43, 0, 235, 1, 16, 2, 208, 254, 42, + 5, 208, 8, 224, 254, 42, 6, 209, 0, 104, 64, 7, 1, 224, 0, 104, 0, 7, + 0, 40, 2, 219, 254, 32, 189, 232, 248, 143, 24, 70, 255, 247, 182, 255, + 0, 144, 76, 252, 255, 48, 81, 33, 0, 139, 70, 8, 67, 102, 208, 191, + 29, 48, 224, 56, 120, 128, 179, 64, 28, 168, 66, 45, 220, 2, 44, 4, + 208, 3, 44, 7, 208, 2, 44, 21, 208, 30, 224, 120, 120, 128, 30, 5, 40, + 7, 217, 15, 224, 120, 120, 20, 40, 3, 208, 31, 40, 1, 208, 21, 40, 18, + 209, 33, 70, 56, 70, 255, 247, 250, 254, 64, 234, 8, 8, 65, 234, 10, + 10, 9, 224, 120, 120, 22, 40, 6, 209, 33, 70, 56, 70, 255, 247, 238, + 254, 6, 67, 65, 234, 9, 9, 23, 248, 1, 11, 41, 26, 73, 30, 77, 178, + 7, 68, 1, 45, 204, 220, 2, 44, 2, 208, 3, 44, 8, 208, 30, 224, 35, 72, + 193, 104, 64, 120, 1, 235, 0, 16, 0, 137, 64, 7, 6, 224, 31, 72, 193, + 104, 64, 120, 1, 235, 0, 16, 0, 137, 0, 7, 0, 40, 13, 218, 0, 154, 43, + 234, 10, 0, 34, 234, 8, 1, 1, 67, 18, 208, 34, 234, 6, 0, 43, 234, 9, + 1, 8, 67, 12, 208, 13, 224, 0, 154, 10, 234, 11, 0, 8, 234, 2, 1, 1, + 67, 4, 209, 22, 64, 9, 234, 11, 0, 6, 67, 1, 208, 0, 32, 143, 231, 255, + 32, 141, 231, 3, 1, 10, 204, 30, 13, 0, 2, 35, 254, 34, 104, 231, 3, + 1, 10, 210, 30, 13, 0, 3, 35, 254, 34, 101, 231, 3, 1, 160, 1, 216, + 30, 13, 0, 45, 76, 252, 255, 43, 82, 33, 0, 233, 240, 65, 7, 78, 250, + 34, 2, 235, 16, 32, 214, 233, 2, 82, 115, 120, 64, 178, 2, 235, 3, 18, + 18, 104, 210, 6, 6, 212, 254, 32, 201, 228, 0, 0, 68, 97, 13, 0, 152, + 107, 13, 0, 140, 29, 14, 224, 33, 120, 113, 177, 74, 28, 130, 66, 11, + 220, 98, 120, 8, 42, 10, 208, 9, 42, 8, 208, 64, 26, 64, 30, 100, 28, + 64, 178, 12, 68, 1, 40, 238, 220, 255, 32, 175, 228, 45, 29, 0, 39, + 79, 240, 1, 8, 23, 224, 42, 120, 146, 177, 149, 248, 59, 0, 4, 40, 14, + 209, 32, 120, 64, 30, 130, 66, 10, 220, 115, 120, 233, 107, 8, 250, + 3, 240, 1, 66, 4, 208, 161, 28, 104, 28, 112, 247, 156, 249, 48, 177, + 64, 53, 127, 28, 255, 178, 176, 120, 135, 66, 228, 211, 220, 231, 56, + 70, 140, 228, 3, 1, 166, 2, 116, 31, 13, 0, 45, 233, 248, 79, 13, 70, + 250, 33, 1, 235, 16, 32, 79, 250, 128, 250, 234, 72, 79, 240, 0, 7, + 185, 70, 193, 104, 64, 120, 1, 235, 0, 16, 0, 104, 128, 6, 1, 212, 254, + 32, 36, 231, 5, 32, 255, 247, 221, 254, 131, 70, 0, 145, 8, 67, 114, + 208, 173, 29, 84, 224, 40, 120, 232, 179, 64, 28, 80, 69, 82, 220, 104, + 120, 255, 40, 68, 209, 219, 72, 132, 104, 36, 29, 0, 38, 57, 224, 32, + 120, 76, 252, 255, 38, 83, 33, 0, 136, 179, 148, 248, 59, 16, 5, 41, + 48, 209, 41, 120, 73, 30, 136, 66, 44, 220, 156, 248, 4, 0, 144, 177, + 0, 32, 223, 248, 76, 131, 11, 224, 33, 24, 75, 120, 138, 127, 19, 64, + 75, 112, 41, 24, 137, 120, 17, 64, 8, 248, 0, 16, 64, 28, 192, 178, + 33, 120, 129, 66, 240, 216, 156, 248, 1, 32, 225, 107, 79, 240, 1, 8, + 8, 250, 2, 240, 1, 66, 13, 208, 34, 120, 197, 73, 96, 28, 112, 247, + 57, 249, 32, 185, 8, 250, 6, 240, 7, 67, 1, 224, 22, 224, 1, 224, 73, + 234, 224, 121, 64, 52, 118, 28, 246, 178, 223, 248, 240, 194, 156, 248, + 2, 0, 134, 66, 191, 211, 21, 248, 1, 11, 170, 235, 0, 1, 73, 30, 79, + 250, 129, 250, 5, 68, 186, 241, 1, 15, 167, 220, 179, 72, 193, 104, + 64, 120, 1, 235, 0, 16, 0, 137, 128, 6, 7, 213, 0, 155, 43, 234, 7, + 1, 35, 234, 9, 0, 1, 67, 7, 208, 8, 224, 0, 154, 7, 234, 11, 7, 9, 234, + 2, 0, 7, 67, 1, 208, 0, 32, 170, 230, 255, 32, 168, 230, 3, 1, 158, + 2, 150, 32, 13, 0, 45, 233, 248, 79, 13, 70, 250, 33, 1, 235, 16, 32, + 71, 178, 79, 240, 0, 1, 161, 72, 137, 70, 138, 70, 193, 104, 64, 120, + 1, 235, 0, 16, 0, 104, 64, 6, 1, 212, 254, 32, 147, 76, 252, 255, 33, + 84, 33, 0, 230, 6, 32, 255, 247, 76, 254, 131, 70, 0, 145, 8, 67, 110, + 208, 173, 29, 74, 224, 40, 120, 232, 179, 64, 28, 184, 66, 71, 220, + 104, 120, 22, 40, 60, 209, 147, 72, 132, 104, 36, 29, 0, 38, 47, 224, + 32, 120, 80, 179, 148, 248, 59, 16, 6, 41, 38, 209, 41, 120, 73, 30, + 136, 66, 34, 220, 156, 248, 4, 0, 144, 177, 0, 32, 223, 248, 40, 130, + 11, 224, 33, 24, 75, 120, 138, 127, 19, 64, 75, 112, 41, 24, 137, 120, + 17, 64, 8, 248, 0, 16, 64, 28, 192, 178, 33, 120, 129, 66, 240, 216, + 156, 248, 1, 32, 225, 107, 1, 32, 144, 64, 1, 66, 5, 208, 34, 120, 125, + 73, 96, 28, 112, 247, 170, 248, 16, 179, 64, 52, 118, 28, 246, 178, + 223, 248, 224, 193, 0, 224, 11, 224, 156, 248, 2, 0, 134, 66, 199, 211, + 21, 248, 1, 11, 57, 26, 73, 30, 79, 178, 5, 68, 1, 47, 178, 220, 112, + 72, 193, 104, 64, 120, 1, 235, 0, 16, 0, 137, 64, 6, 14, 213, 0, 155, + 43, 234, 9, 0, 35, 234, 10, 1, 8, 67, 14, 208, 15, 224, 1, 32, 176, + 64, 64, 234, 9, 9, 74, 234, 224, 122, 224, 231, 0, 155, 9, 234, 11, + 1, 10, 234, 3, 0, 1, 67, 1, 208, 0, 32, 29, 230, 255, 32, 27, 230, 3, + 1, 230, 1, 176, 33, 13, 0, 45, 233, 76, 252, 255, 28, 85, 33, 0, 240, + 95, 147, 70, 94, 74, 192, 178, 138, 70, 1, 240, 15, 4, 80, 112, 209, + 104, 0, 37, 1, 235, 0, 16, 46, 70, 144, 249, 11, 48, 1, 104, 233, 179, + 0, 123, 48, 177, 2, 40, 2, 208, 1, 40, 2, 208, 2, 224, 2, 38, 0, 224, + 1, 38, 83, 72, 208, 248, 3, 0, 144, 249, 1, 1, 152, 66, 61, 221, 145, + 70, 8, 4, 62, 212, 89, 70, 80, 70, 255, 247, 158, 253, 7, 70, 255, 40, + 51, 208, 1, 44, 51, 208, 89, 70, 80, 70, 255, 247, 91, 254, 255, 40, + 43, 208, 1, 35, 58, 70, 89, 70, 80, 70, 255, 247, 89, 250, 255, 40, + 35, 208, 223, 248, 4, 129, 0, 36, 8, 241, 20, 8, 79, 70, 88, 248, 36, + 32, 89, 70, 80, 70, 144, 71, 255, 40, 28, 208, 185, 120, 136, 66, 7, + 210, 121, 120, 248, 104, 0, 224, 15, 224, 0, 235, 1, 16, 128, 122, 120, + 177, 100, 28, 228, 178, 4, 44, 233, 211, 121, 120, 248, 104, 0, 235, + 1, 16, 128, 122, 1, 40, 4, 208, 29, 177, 0, 32, 30, 228, 254, 40, 251, + 208, 48, 70, 26, 228, 121, 120, 248, 104, 0, 235, 1, 16, 128, 122, 1, + 40, 242, 208, 109, 28, 237, 178, 227, 231, 3, 1, 46, 146, 34, 13, 0, + 45, 233, 240, 65, 0, 37, 7, 70, 136, 70, 44, 70, 36, 78, 7, 224, 66, + 70, 57, 70, 76, 252, 255, 23, 86, 33, 0, 32, 70, 255, 247, 130, 255, + 5, 67, 100, 28, 228, 178, 240, 120, 132, 66, 244, 211, 40, 70, 29, 230, + 3, 1, 36, 188, 34, 13, 0, 31, 72, 16, 181, 0, 104, 128, 7, 1, 213, 172, + 247, 67, 250, 25, 72, 0, 121, 0, 40, 3, 208, 189, 232, 16, 64, 255, + 247, 188, 186, 16, 189, 3, 1, 58, 220, 34, 13, 0, 16, 181, 20, 76, 160, + 104, 40, 177, 161, 120, 4, 34, 2, 235, 129, 17, 115, 247, 128, 248, + 224, 104, 24, 177, 225, 120, 9, 1, 115, 247, 122, 248, 32, 105, 24, + 177, 64, 242, 45, 17, 115, 247, 116, 248, 0, 32, 32, 112, 96, 112, 32, + 113, 16, 189, 3, 1, 54, 18, 35, 13, 0, 7, 72, 0, 121, 56, 185, 8, 72, + 0, 104, 128, 7, 5, 213, 7, 72, 0, 104, 0, 104, 8, 177, 1, 32, 112, 71, + 0, 32, 112, 71, 68, 97, 13, 0, 152, 107, 13, 0, 144, 149, 32, 0, 156, + 41, 32, 0, 28, 52, 32, 0, 3, 1, 64, 68, 35, 13, 0, 112, 181, 14, 70, + 5, 70, 20, 70, 179, 66, 21, 217, 4, 43, 12, 208, 255, 34, 16, 33, 32, + 70, 162, 247, 173, 251, 50, 70, 41, 70, 4, 241, 12, 0, 189, 232, 112, + 64, 115, 247, 91, 186, 40, 120, 32, 112, 104, 120, 96, 112, 255, 32, + 224, 112, 144, 112, 112, 189, 0, 0, 3, 1, 184, 1, 128, 76, 252, 255, + 18, 87, 33, 0, 35, 13, 0, 112, 181, 152, 176, 4, 70, 0, 241, 24, 5, + 6, 33, 12, 168, 170, 247, 255, 250, 6, 34, 33, 70, 12, 168, 170, 247, + 18, 251, 64, 28, 68, 209, 89, 73, 6, 34, 14, 70, 32, 70, 170, 247, 10, + 251, 64, 28, 60, 209, 6, 34, 41, 70, 12, 168, 170, 247, 3, 251, 64, + 28, 53, 209, 6, 34, 49, 70, 40, 70, 170, 247, 252, 250, 64, 28, 46, + 209, 6, 34, 41, 70, 18, 168, 170, 247, 121, 251, 6, 34, 33, 70, 6, 168, + 170, 247, 116, 251, 6, 169, 6, 35, 34, 70, 8, 70, 170, 247, 101, 251, + 34, 70, 6, 35, 17, 70, 104, 70, 170, 247, 113, 251, 105, 70, 6, 35, + 34, 70, 8, 70, 170, 247, 107, 251, 64, 73, 106, 70, 6, 35, 36, 57, 16, + 70, 170, 247, 109, 251, 106, 70, 6, 35, 6, 169, 16, 70, 170, 247, 94, + 251, 6, 34, 105, 70, 18, 168, 170, 247, 204, 250, 16, 177, 0, 32, 24, + 176, 112, 189, 1, 32, 251, 231, 3, 1, 184, 1, 52, 36, 13, 0, 112, 181, + 160, 176, 4, 70, 0, 241, 32, 5, 8, 33, 16, 168, 170, 247, 165, 250, + 8, 34, 33, 70, 16, 168, 170, 247, 184, 250, 64, 28, 68, 209, 45, 73, + 8, 34, 14, 70, 32, 70, 170, 247, 176, 250, 64, 28, 60, 209, 8, 34, 41, + 70, 16, 168, 170, 247, 169, 250, 64, 28, 76, 252, 255, 13, 88, 33, 0, + 53, 209, 8, 34, 49, 70, 40, 70, 170, 247, 162, 250, 64, 28, 46, 209, + 8, 34, 41, 70, 24, 168, 170, 247, 31, 251, 8, 34, 33, 70, 8, 168, 170, + 247, 26, 251, 8, 169, 8, 35, 34, 70, 8, 70, 170, 247, 11, 251, 34, 70, + 8, 35, 17, 70, 104, 70, 170, 247, 23, 251, 105, 70, 8, 35, 34, 70, 8, + 70, 170, 247, 17, 251, 20, 73, 106, 70, 8, 35, 36, 57, 16, 70, 170, + 247, 19, 251, 106, 70, 8, 35, 8, 169, 16, 70, 170, 247, 4, 251, 8, 34, + 105, 70, 24, 168, 170, 247, 114, 250, 16, 177, 0, 32, 32, 176, 112, + 189, 1, 32, 251, 231, 3, 1, 48, 232, 36, 13, 0, 16, 181, 4, 70, 8, 72, + 0, 104, 113, 247, 168, 251, 0, 40, 32, 70, 2, 208, 189, 232, 16, 64, + 153, 231, 189, 232, 16, 64, 60, 231, 0, 0, 52, 225, 32, 0, 24, 226, + 32, 0, 216, 122, 32, 0, 3, 1, 22, 20, 37, 13, 0, 16, 181, 22, 72, 255, + 247, 230, 255, 8, 177, 0, 32, 16, 189, 1, 32, 16, 189, 3, 1, 86, 38, + 37, 13, 0, 45, 233, 255, 65, 17, 79, 6, 70, 63, 31, 12, 70, 21, 70, + 56, 29, 255, 247, 215, 255, 136, 177, 56, 104, 13, 73, 40, 48, 0, 149, + 3, 148, 205, 233, 1, 16, 7, 241, 100, 2, 162, 241, 16, 1, 51, 70, 1, + 241, 76, 252, 255, 8, 89, 33, 0, 32, 0, 154, 247, 70, 252, 189, 232, + 255, 129, 4, 176, 32, 70, 189, 232, 240, 65, 6, 33, 154, 247, 246, 188, + 0, 0, 220, 122, 32, 0, 100, 28, 32, 0, 3, 1, 192, 2, 120, 37, 13, 0, + 45, 233, 247, 79, 130, 176, 4, 0, 24, 208, 180, 248, 80, 16, 180, 248, + 78, 0, 13, 26, 149, 66, 0, 217, 21, 70, 40, 68, 164, 248, 78, 0, 32, + 108, 169, 70, 40, 68, 32, 100, 97, 106, 4, 241, 16, 0, 79, 240, 0, 10, + 0, 144, 81, 185, 129, 247, 195, 248, 24, 177, 0, 32, 5, 176, 189, 232, + 240, 143, 32, 105, 96, 98, 196, 248, 44, 160, 212, 248, 36, 128, 4, + 241, 85, 11, 87, 224, 180, 248, 76, 16, 224, 106, 14, 26, 174, 66, 0, + 217, 46, 70, 161, 105, 8, 241, 12, 7, 56, 68, 11, 104, 50, 70, 3, 153, + 152, 71, 3, 144, 148, 248, 84, 0, 48, 177, 224, 106, 50, 70, 193, 25, + 88, 70, 148, 247, 25, 253, 8, 224, 148, 248, 85, 0, 40, 177, 224, 106, + 50, 70, 193, 25, 88, 70, 148, 247, 247, 252, 224, 106, 173, 27, 48, + 68, 224, 98, 180, 248, 76, 16, 136, 66, 44, 209, 64, 70, 129, 247, 130, + 248, 4, 241, 8, 1, 64, 70, 129, 247, 121, 248, 196, 248, 44, 160, 0, + 152, 129, 247, 125, 248, 216, 177, 196, 248, 36, 160, 93, 177, 180, + 248, 78, 76, 252, 255, 3, 90, 33, 0, 0, 169, 235, 5, 9, 160, 235, 5, + 0, 164, 248, 78, 0, 32, 108, 160, 235, 5, 0, 32, 100, 224, 105, 180, + 248, 78, 32, 129, 104, 217, 177, 193, 139, 203, 6, 24, 213, 193, 243, + 1, 3, 1, 43, 6, 208, 8, 224, 32, 105, 96, 98, 128, 70, 0, 45, 165, 209, + 236, 231, 131, 139, 147, 66, 4, 217, 139, 7, 8, 209, 131, 139, 147, + 66, 5, 211, 33, 240, 16, 1, 193, 131, 130, 104, 129, 105, 144, 71, 160, + 105, 193, 139, 65, 240, 16, 1, 193, 131, 32, 70, 148, 247, 130, 251, + 72, 70, 128, 231, 3, 1, 148, 1, 180, 38, 13, 0, 45, 233, 248, 67, 4, + 0, 136, 70, 23, 70, 29, 70, 13, 208, 96, 105, 0, 40, 11, 208, 114, 247, + 199, 254, 6, 70, 224, 139, 128, 6, 7, 213, 96, 105, 41, 70, 148, 247, + 96, 254, 3, 224, 0, 32, 189, 232, 248, 131, 0, 32, 56, 67, 173, 248, + 0, 0, 141, 248, 2, 80, 35, 104, 3, 34, 105, 70, 64, 70, 152, 71, 1, + 70, 96, 105, 42, 70, 148, 247, 28, 252, 97, 105, 200, 105, 177, 248, + 78, 32, 129, 104, 161, 177, 193, 139, 203, 6, 17, 213, 193, 243, 1, + 3, 1, 43, 2, 209, 131, 139, 147, 66, 4, 217, 139, 7, 8, 209, 131, 139, + 147, 66, 5, 211, 33, 240, 16, 1, 193, 131, 130, 104, 129, 105, 144, + 71, 48, 70, 76, 252, 255, 254, 90, 33, 0, 114, 247, 145, 254, 40, 70, + 205, 231, 3, 1, 94, 68, 39, 13, 0, 45, 233, 240, 65, 4, 0, 14, 70, 21, + 70, 32, 208, 224, 139, 122, 73, 192, 243, 129, 0, 49, 248, 16, 0, 160, + 245, 112, 97, 255, 57, 22, 208, 148, 248, 36, 0, 1, 40, 18, 209, 96, + 105, 128, 177, 114, 247, 115, 254, 7, 70, 96, 105, 41, 70, 148, 247, + 26, 254, 96, 105, 42, 70, 49, 70, 148, 247, 110, 252, 56, 70, 189, 232, + 240, 65, 114, 247, 104, 190, 48, 70, 189, 232, 240, 65, 17, 70, 148, + 247, 143, 186, 3, 1, 186, 1, 158, 39, 13, 0, 45, 233, 240, 65, 4, 0, + 192, 139, 192, 243, 129, 6, 81, 208, 96, 105, 0, 40, 78, 208, 48, 70, + 121, 247, 54, 250, 5, 0, 2, 209, 90, 247, 99, 250, 136, 177, 95, 72, + 0, 235, 198, 7, 90, 247, 93, 250, 56, 179, 93, 72, 0, 104, 16, 244, + 64, 15, 96, 105, 176, 248, 76, 96, 10, 208, 240, 46, 19, 217, 48, 70, + 18, 224, 96, 105, 176, 248, 78, 16, 189, 232, 240, 65, 148, 247, 100, + 187, 120, 46, 1, 217, 48, 70, 0, 224, 120, 32, 168, 66, 11, 210, 120, + 46, 6, 216, 120, 37, 7, 224, 240, 32, 168, 66, 4, 210, 240, 46, 1, 217, + 53, 70, 0, 224, 240, 37, 96, 105, 14, 224, 96, 105, 176, 248, 76, 96, + 60, 46, 1, 217, 76, 252, 255, 249, 91, 33, 0, 49, 70, 0, 224, 60, 33, + 169, 66, 4, 210, 60, 46, 1, 217, 53, 70, 0, 224, 60, 37, 41, 70, 148, + 247, 194, 253, 96, 105, 42, 70, 57, 70, 189, 232, 240, 65, 148, 247, + 118, 187, 189, 232, 240, 129, 3, 1, 252, 1, 84, 40, 13, 0, 45, 233, + 240, 65, 5, 0, 192, 139, 58, 73, 192, 243, 129, 6, 198, 235, 6, 16, + 0, 235, 134, 16, 1, 235, 128, 7, 239, 208, 104, 105, 0, 40, 236, 208, + 48, 70, 121, 247, 181, 249, 4, 0, 231, 208, 47, 72, 0, 31, 0, 235, 198, + 6, 90, 247, 253, 249, 96, 179, 45, 72, 0, 104, 16, 244, 64, 15, 104, + 105, 176, 248, 76, 112, 3, 208, 240, 47, 12, 217, 56, 70, 11, 224, 120, + 47, 1, 217, 56, 70, 0, 224, 120, 32, 160, 66, 11, 210, 120, 47, 6, 216, + 120, 36, 7, 224, 240, 32, 160, 66, 4, 210, 240, 47, 1, 217, 60, 70, + 0, 224, 240, 36, 104, 105, 33, 70, 148, 247, 111, 253, 104, 105, 34, + 70, 49, 70, 148, 247, 195, 251, 40, 70, 189, 232, 240, 65, 89, 247, + 131, 190, 215, 248, 228, 16, 136, 2, 11, 213, 0, 32, 1, 224, 50, 104, + 64, 28, 176, 235, 84, 15, 250, 211, 33, 244, 0, 16, 199, 248, 228, 0, + 163, 231, 104, 105, 176, 248, 76, 112, 60, 47, 1, 217, 57, 70, 0, 224, + 60, 33, 161, 66, 4, 76, 252, 255, 244, 92, 33, 0, 210, 60, 47, 1, 217, + 60, 70, 0, 224, 60, 36, 33, 70, 148, 247, 67, 253, 104, 105, 34, 70, + 49, 70, 189, 232, 240, 65, 148, 247, 149, 187, 0, 0, 180, 49, 32, 0, + 8, 16, 53, 0, 88, 30, 32, 0, 172, 117, 32, 0, 3, 1, 32, 76, 41, 13, + 0, 16, 181, 107, 247, 5, 254, 0, 40, 6, 208, 1, 33, 128, 248, 237, 16, + 189, 232, 16, 64, 107, 247, 8, 189, 16, 189, 0, 0, 3, 1, 136, 2, 104, + 41, 13, 0, 45, 233, 240, 95, 69, 105, 176, 248, 30, 192, 4, 70, 135, + 140, 181, 248, 76, 32, 0, 106, 139, 70, 204, 243, 129, 8, 22, 70, 0, + 40, 28, 208, 50, 73, 223, 248, 204, 160, 9, 136, 139, 6, 79, 240, 210, + 1, 9, 212, 218, 248, 0, 48, 51, 185, 187, 7, 91, 15, 33, 250, 3, 243, + 219, 67, 155, 7, 9, 208, 187, 7, 91, 15, 217, 64, 1, 240, 3, 1, 79, + 240, 1, 9, 2, 41, 3, 208, 69, 224, 0, 32, 189, 232, 240, 159, 95, 234, + 140, 97, 63, 212, 120, 247, 53, 249, 16, 177, 187, 241, 0, 15, 29, 208, + 184, 6, 0, 213, 118, 16, 31, 73, 193, 248, 176, 146, 225, 139, 30, 74, + 193, 243, 129, 1, 81, 92, 142, 64, 28, 73, 14, 96, 27, 73, 9, 250, 8, + 240, 8, 57, 8, 96, 10, 104, 2, 66, 252, 209, 32, 106, 181, 76, 252, + 255, 239, 93, 33, 0, 248, 76, 32, 12, 48, 22, 73, 162, 247, 133, 248, + 7, 224, 96, 105, 0, 33, 176, 248, 76, 32, 32, 106, 12, 48, 162, 247, + 158, 248, 33, 106, 79, 244, 0, 80, 136, 96, 218, 248, 0, 0, 24, 177, + 32, 106, 79, 244, 192, 65, 129, 96, 132, 248, 39, 144, 105, 108, 181, + 248, 76, 32, 72, 70, 17, 68, 105, 100, 186, 231, 41, 107, 12, 48, 230, + 231, 0, 0, 8, 30, 32, 0, 164, 53, 32, 0, 0, 144, 49, 0, 136, 96, 13, + 0, 8, 141, 49, 0, 120, 142, 49, 0, 3, 1, 56, 108, 42, 13, 0, 112, 181, + 5, 70, 8, 70, 1, 38, 144, 248, 163, 0, 181, 248, 11, 64, 169, 122, 64, + 9, 0, 34, 70, 247, 185, 251, 0, 40, 9, 208, 64, 136, 160, 66, 0, 210, + 4, 70, 42, 122, 33, 70, 48, 70, 76, 247, 36, 255, 1, 32, 112, 189, 3, + 1, 86, 160, 42, 13, 0, 16, 181, 4, 70, 0, 33, 19, 32, 127, 247, 183, + 250, 253, 247, 144, 255, 52, 72, 0, 120, 1, 40, 1, 209, 51, 73, 8, 112, + 51, 73, 0, 32, 8, 112, 51, 73, 193, 233, 10, 0, 140, 247, 160, 248, + 113, 247, 35, 248, 24, 177, 189, 232, 16, 64, 137, 247, 81, 190, 1, + 32, 89, 247, 81, 248, 180, 248, 9, 0, 0, 33, 48, 247, 175, 253, 189, + 232, 16, 64, 1, 240, 125, 190, 3, 1, 76, 252, 255, 234, 94, 33, 0, 48, + 242, 42, 13, 0, 16, 181, 4, 70, 10, 34, 85, 33, 12, 32, 48, 247, 184, + 253, 1, 70, 8, 48, 34, 104, 192, 248, 2, 32, 98, 104, 192, 248, 6, 32, + 34, 137, 66, 129, 189, 232, 16, 64, 8, 70, 48, 247, 56, 189, 3, 1, 122, + 30, 43, 13, 0, 62, 181, 0, 241, 9, 4, 0, 32, 0, 144, 1, 144, 2, 144, + 212, 248, 3, 0, 0, 144, 212, 248, 7, 0, 1, 144, 180, 248, 11, 0, 173, + 248, 8, 0, 21, 70, 104, 70, 136, 247, 105, 253, 33, 123, 9, 6, 23, 212, + 20, 40, 21, 211, 15, 73, 10, 34, 9, 29, 224, 28, 111, 247, 157, 251, + 0, 40, 12, 208, 224, 28, 112, 247, 236, 250, 144, 247, 205, 249, 32, + 177, 144, 247, 243, 249, 224, 28, 255, 247, 189, 255, 137, 247, 39, + 248, 62, 189, 18, 32, 104, 113, 62, 189, 106, 97, 13, 0, 151, 30, 32, + 0, 104, 97, 13, 0, 24, 65, 32, 0, 3, 1, 20, 148, 43, 13, 0, 124, 72, + 129, 104, 194, 248, 6, 16, 192, 104, 194, 248, 10, 0, 112, 71, 3, 1, + 62, 164, 43, 13, 0, 112, 181, 121, 76, 14, 70, 0, 241, 9, 5, 161, 105, + 49, 177, 176, 248, 9, 0, 189, 232, 112, 64, 12, 33, 48, 247, 68, 189, + 115, 72, 113, 247, 177, 249, 169, 247, 26, 249, 114, 72, 165, 97, 196, + 233, 2, 4, 111, 76, 252, 255, 229, 95, 33, 0, 72, 113, 247, 174, 249, + 0, 32, 48, 112, 112, 189, 3, 1, 44, 222, 43, 13, 0, 112, 181, 4, 70, + 13, 70, 22, 70, 160, 247, 152, 253, 40, 185, 0, 35, 26, 70, 25, 70, + 2, 32, 253, 247, 254, 254, 50, 70, 41, 70, 32, 70, 189, 232, 112, 64, + 130, 247, 221, 187, 3, 1, 40, 6, 44, 13, 0, 112, 181, 0, 241, 9, 4, + 21, 70, 130, 247, 14, 252, 104, 121, 0, 40, 7, 209, 34, 29, 225, 120, + 189, 232, 112, 64, 0, 35, 1, 32, 253, 247, 230, 190, 112, 189, 3, 1, + 182, 2, 42, 44, 13, 0, 45, 233, 252, 65, 0, 241, 9, 4, 0, 38, 171, 247, + 26, 253, 64, 185, 87, 72, 68, 242, 16, 1, 0, 104, 8, 66, 4, 208, 171, + 247, 79, 253, 8, 177, 12, 38, 125, 224, 180, 248, 5, 16, 180, 248, 3, + 0, 69, 247, 40, 252, 32, 179, 97, 139, 32, 139, 205, 233, 0, 1, 227, + 138, 162, 138, 97, 138, 32, 138, 69, 247, 46, 252, 200, 177, 97, 247, + 103, 254, 192, 177, 0, 32, 111, 247, 205, 252, 7, 70, 255, 40, 20, 208, + 164, 247, 232, 255, 56, 70, 111, 247, 79, 252, 5, 70, 63, 72, 113, 247, + 72, 249, 98, 139, 33, 139, 40, 70, 69, 247, 51, 252, 224, 121, 48, 177, + 15, 224, 18, 38, 79, 224, 13, 38, 77, 224, 9, 38, 75, 224, 32, 122, + 133, 248, 76, 252, 255, 224, 96, 33, 0, 86, 0, 212, 248, 9, 0, 40, 101, + 180, 248, 13, 0, 165, 248, 84, 0, 224, 123, 133, 248, 87, 0, 32, 138, + 165, 248, 72, 0, 96, 138, 165, 248, 74, 0, 149, 248, 210, 0, 165, 247, + 99, 251, 33, 138, 1, 128, 97, 138, 65, 128, 160, 138, 40, 129, 224, + 138, 104, 129, 40, 70, 168, 247, 201, 253, 37, 72, 113, 247, 27, 249, + 41, 70, 32, 70, 130, 247, 192, 249, 0, 40, 38, 209, 1, 32, 171, 247, + 157, 252, 56, 70, 171, 247, 150, 252, 180, 248, 5, 0, 32, 240, 1, 0, + 171, 247, 243, 252, 180, 248, 3, 0, 32, 240, 1, 0, 171, 247, 245, 252, + 224, 121, 171, 247, 226, 252, 25, 73, 0, 32, 254, 247, 32, 248, 0, 33, + 8, 70, 171, 247, 49, 252, 110, 247, 64, 248, 21, 73, 8, 96, 32, 136, + 49, 70, 189, 232, 252, 65, 48, 247, 163, 188, 189, 232, 252, 129, 3, + 1, 76, 92, 45, 13, 0, 16, 181, 4, 70, 171, 247, 132, 252, 64, 177, 0, + 32, 171, 247, 111, 252, 189, 232, 16, 64, 10, 73, 16, 32, 254, 247, + 2, 184, 180, 248, 9, 0, 189, 232, 16, 64, 12, 33, 48, 247, 97, 188, + 0, 0, 16, 130, 32, 0, 244, 239, 32, 0, 136, 41, 32, 0, 99, 133, 1, 0, + 156, 41, 32, 0, 92, 239, 32, 0, 20, 52, 32, 0, 3, 1, 106, 164, 45, 13, + 0, 45, 76, 252, 255, 219, 97, 33, 0, 233, 240, 65, 5, 70, 0, 241, 9, + 4, 14, 70, 144, 70, 224, 28, 112, 247, 221, 251, 208, 177, 193, 105, + 193, 243, 196, 1, 4, 41, 21, 208, 8, 41, 19, 210, 7, 70, 0, 241, 40, + 1, 112, 247, 29, 252, 160, 177, 248, 105, 128, 2, 10, 212, 56, 104, + 140, 247, 163, 248, 48, 177, 57, 104, 11, 32, 48, 247, 72, 253, 56, + 104, 112, 247, 226, 254, 66, 70, 49, 70, 40, 70, 189, 232, 240, 65, + 124, 247, 70, 186, 32, 136, 189, 232, 240, 65, 18, 33, 48, 247, 74, + 188, 3, 1, 54, 10, 46, 13, 0, 45, 233, 240, 65, 5, 70, 14, 70, 0, 241, + 9, 4, 23, 70, 128, 137, 3, 33, 112, 247, 27, 252, 48, 177, 58, 70, 49, + 70, 40, 70, 189, 232, 240, 65, 124, 247, 102, 187, 32, 136, 189, 232, + 240, 65, 2, 33, 48, 247, 49, 188, 3, 1, 84, 60, 46, 13, 0, 0, 35, 210, + 30, 252, 42, 32, 211, 4, 41, 30, 211, 2, 104, 65, 104, 138, 66, 3, 208, + 10, 177, 193, 185, 0, 224, 177, 177, 1, 122, 66, 123, 145, 66, 18, 209, + 65, 138, 129, 177, 129, 138, 113, 177, 208, 248, 22, 32, 208, 248, 26, + 16, 138, 66, 3, 208, 10, 177, 49, 185, 0, 224, 33, 177, 129, 127, 144, + 248, 35, 0, 129, 66, 0, 208, 18, 35, 24, 70, 112, 71, 3, 1, 100, 140, + 46, 13, 76, 252, 255, 214, 98, 33, 0, 0, 1, 70, 22, 75, 209, 248, 22, + 32, 9, 141, 0, 32, 201, 8, 178, 251, 241, 242, 25, 104, 178, 245, 250, + 95, 33, 244, 64, 1, 13, 208, 178, 245, 122, 95, 17, 208, 178, 245, 122, + 111, 6, 209, 1, 245, 0, 1, 33, 240, 56, 0, 24, 96, 79, 244, 250, 48, + 112, 71, 33, 240, 56, 0, 8, 48, 24, 96, 79, 244, 122, 48, 112, 71, 1, + 245, 128, 1, 33, 240, 56, 0, 16, 48, 24, 96, 79, 244, 250, 32, 112, + 71, 0, 0, 88, 30, 32, 0, 3, 1, 172, 1, 236, 46, 13, 0, 45, 233, 240, + 71, 4, 70, 13, 70, 254, 247, 173, 252, 79, 240, 7, 9, 1, 40, 4, 208, + 41, 104, 129, 248, 5, 144, 189, 232, 240, 135, 32, 121, 18, 33, 247, + 79, 2, 40, 8, 216, 3, 210, 98, 121, 59, 120, 154, 66, 3, 210, 40, 185, + 162, 122, 1, 42, 2, 217, 40, 104, 65, 113, 236, 231, 46, 104, 223, 248, + 192, 131, 240, 113, 32, 121, 56, 177, 1, 40, 25, 208, 2, 33, 0, 32, + 171, 247, 71, 252, 56, 120, 26, 224, 234, 74, 96, 121, 18, 104, 2, 235, + 0, 16, 0, 104, 24, 177, 41, 104, 23, 32, 72, 113, 211, 231, 152, 248, + 0, 0, 58, 120, 144, 66, 222, 210, 32, 70, 254, 247, 146, 252, 2, 224, + 32, 70, 254, 247, 185, 252, 57, 120, 152, 248, 0, 0, 8, 26, 76, 252, + 255, 209, 99, 33, 0, 48, 114, 40, 104, 64, 121, 0, 40, 190, 209, 32, + 121, 240, 113, 41, 104, 129, 248, 1, 144, 184, 231, 3, 1, 176, 1, 148, + 47, 13, 0, 45, 233, 240, 65, 4, 70, 13, 70, 254, 247, 89, 252, 79, 240, + 7, 8, 1, 40, 71, 209, 32, 121, 18, 39, 2, 40, 8, 216, 2, 210, 33, 123, + 2, 41, 4, 216, 204, 74, 97, 121, 18, 120, 145, 66, 3, 211, 40, 104, + 71, 113, 189, 232, 240, 129, 46, 104, 40, 177, 1, 40, 19, 208, 2, 40, + 28, 208, 119, 113, 245, 231, 32, 123, 11, 70, 64, 240, 128, 2, 161, + 29, 0, 32, 254, 247, 170, 252, 254, 40, 36, 208, 253, 40, 17, 209, 41, + 104, 23, 32, 72, 113, 229, 231, 32, 123, 11, 70, 64, 240, 128, 2, 161, + 29, 0, 32, 254, 247, 16, 253, 255, 40, 217, 208, 2, 224, 0, 32, 254, + 247, 81, 253, 40, 104, 64, 121, 0, 40, 211, 209, 32, 121, 240, 113, + 41, 104, 180, 72, 129, 248, 1, 128, 0, 104, 179, 73, 0, 120, 9, 120, + 8, 26, 48, 114, 198, 231, 41, 104, 129, 248, 5, 128, 194, 231, 3, 1, + 254, 1, 64, 48, 13, 0, 45, 233, 240, 71, 4, 70, 13, 70, 0, 38, 254, + 247, 2, 252, 79, 240, 7, 9, 1, 40, 109, 209, 32, 121, 2, 40, 2, 210, + 161, 120, 201, 30, 206, 178, 79, 240, 18, 8, 200, 177, 2, 76, 252, 255, + 204, 100, 33, 0, 40, 19, 216, 161, 120, 2, 41, 16, 211, 2, 40, 22, 216, + 157, 74, 97, 121, 18, 120, 145, 66, 9, 210, 2, 40, 15, 210, 16, 46, + 5, 216, 2, 46, 11, 208, 4, 46, 9, 208, 16, 46, 7, 208, 41, 104, 129, + 248, 5, 128, 52, 231, 241, 7, 249, 209, 118, 8, 227, 231, 47, 104, 48, + 177, 1, 40, 25, 208, 2, 40, 38, 208, 135, 248, 5, 128, 39, 231, 224, + 120, 99, 121, 3, 40, 50, 70, 4, 241, 6, 1, 7, 208, 3, 32, 254, 247, + 58, 252, 254, 40, 49, 208, 253, 40, 2, 208, 27, 224, 2, 32, 246, 231, + 41, 104, 23, 32, 72, 113, 18, 231, 224, 120, 99, 121, 3, 40, 50, 70, + 4, 241, 6, 1, 5, 208, 3, 32, 254, 247, 155, 252, 255, 40, 205, 208, + 8, 224, 2, 32, 248, 231, 224, 120, 97, 121, 3, 40, 19, 208, 3, 32, 254, + 247, 214, 252, 40, 104, 64, 121, 0, 40, 194, 209, 32, 121, 248, 113, + 41, 104, 119, 72, 129, 248, 1, 144, 0, 104, 118, 73, 0, 120, 9, 120, + 8, 26, 56, 114, 235, 230, 2, 32, 234, 231, 41, 104, 129, 248, 5, 144, + 229, 230, 3, 1, 248, 1, 58, 49, 13, 0, 45, 233, 240, 65, 4, 70, 13, + 70, 254, 247, 134, 251, 7, 39, 1, 40, 109, 209, 35, 121, 79, 240, 18, + 8, 2, 43, 7, 216, 160, 120, 3, 40, 4, 211, 76, 252, 255, 199, 101, 33, + 0, 99, 74, 97, 121, 18, 120, 145, 66, 3, 211, 41, 104, 129, 248, 5, + 128, 43, 231, 192, 30, 194, 178, 224, 120, 46, 104, 6, 40, 3, 208, 7, + 40, 1, 208, 99, 177, 0, 224, 35, 177, 1, 43, 33, 208, 2, 43, 50, 208, + 60, 224, 211, 7, 2, 208, 134, 248, 5, 128, 22, 231, 82, 8, 5, 40, 12, + 208, 11, 70, 6, 40, 4, 241, 6, 1, 11, 208, 6, 32, 254, 247, 200, 251, + 254, 40, 58, 208, 253, 40, 6, 208, 39, 224, 11, 70, 161, 29, 4, 32, + 244, 231, 5, 32, 242, 231, 41, 104, 23, 32, 72, 113, 252, 230, 5, 40, + 10, 208, 11, 70, 6, 40, 4, 241, 6, 1, 9, 208, 6, 32, 254, 247, 37, 252, + 255, 40, 192, 208, 16, 224, 11, 70, 161, 29, 4, 32, 246, 231, 5, 32, + 244, 231, 5, 40, 3, 208, 6, 40, 3, 208, 6, 32, 2, 224, 4, 32, 0, 224, + 5, 32, 254, 247, 88, 252, 40, 104, 64, 121, 0, 40, 173, 209, 32, 121, + 240, 113, 40, 104, 57, 73, 71, 112, 55, 72, 9, 120, 0, 104, 0, 120, + 8, 26, 48, 114, 206, 230, 40, 104, 71, 113, 203, 230, 3, 1, 152, 1, + 46, 50, 13, 0, 112, 181, 140, 176, 0, 241, 9, 4, 205, 248, 40, 208, + 0, 32, 5, 38, 141, 248, 5, 0, 141, 248, 1, 96, 224, 120, 109, 70, 8, + 40, 34, 210, 223, 76, 252, 255, 194, 102, 33, 0, 232, 0, 240, 4, 13, + 18, 23, 23, 28, 28, 28, 41, 73, 32, 121, 8, 112, 141, 248, 7, 0, 6, + 32, 141, 248, 1, 0, 22, 224, 10, 169, 32, 70, 255, 247, 60, 254, 17, + 224, 10, 169, 32, 70, 255, 247, 139, 254, 12, 224, 10, 169, 32, 70, + 255, 247, 220, 254, 7, 224, 10, 169, 32, 70, 255, 247, 84, 255, 2, 224, + 18, 32, 141, 248, 5, 0, 10, 153, 0, 41, 10, 208, 32, 70, 145, 247, 16, + 252, 10, 152, 65, 121, 1, 177, 70, 112, 168, 66, 3, 209, 48, 247, 180, + 249, 12, 176, 112, 189, 8, 56, 48, 247, 103, 249, 249, 231, 3, 1, 78, + 194, 50, 13, 0, 16, 181, 20, 70, 80, 247, 133, 254, 14, 73, 8, 120, + 8, 177, 13, 72, 0, 136, 32, 129, 72, 120, 1, 40, 3, 209, 224, 114, 3, + 72, 0, 120, 32, 115, 0, 32, 96, 115, 16, 189, 0, 0, 71, 97, 13, 0, 68, + 97, 13, 0, 80, 97, 13, 0, 76, 97, 13, 0, 70, 97, 13, 0, 72, 97, 13, + 0, 216, 11, 33, 0, 84, 41, 32, 0, 3, 1, 154, 1, 12, 51, 13, 0, 45, 233, + 240, 65, 0, 241, 9, 1, 5, 123, 64, 123, 78, 121, 16, 114, 149, 113, + 192, 243, 65, 1, 20, 70, 0, 240, 1, 7, 214, 113, 3, 41, 5, 208, 41, + 6, 5, 213, 17, 32, 80, 113, 189, 232, 240, 129, 18, 76, 252, 255, 189, + 103, 33, 0, 32, 250, 231, 4, 45, 1, 210, 108, 73, 1, 224, 107, 73, 9, + 29, 171, 7, 79, 234, 211, 108, 10, 104, 255, 35, 3, 250, 12, 243, 154, + 67, 0, 250, 12, 240, 16, 67, 101, 74, 8, 96, 16, 104, 79, 234, 133, + 3, 79, 240, 15, 1, 1, 250, 3, 241, 32, 234, 1, 0, 16, 96, 135, 240, + 1, 2, 79, 240, 0, 1, 40, 70, 143, 247, 177, 248, 39, 177, 40, 70, 143, + 247, 158, 248, 198, 178, 3, 224, 49, 70, 40, 70, 143, 247, 138, 248, + 230, 113, 0, 32, 96, 113, 201, 231, 3, 1, 44, 162, 51, 13, 0, 112, 181, + 0, 241, 9, 5, 0, 123, 2, 33, 20, 70, 177, 235, 208, 15, 2, 216, 48, + 32, 80, 113, 112, 189, 143, 247, 134, 248, 224, 113, 232, 120, 160, + 113, 0, 32, 96, 113, 112, 189, 3, 1, 42, 202, 51, 13, 0, 16, 181, 4, + 70, 114, 247, 68, 248, 74, 74, 210, 248, 0, 17, 20, 177, 65, 244, 0, + 1, 1, 224, 33, 244, 0, 1, 194, 248, 0, 17, 189, 232, 16, 64, 114, 247, + 57, 184, 3, 1, 78, 240, 51, 13, 0, 112, 181, 4, 70, 13, 70, 114, 247, + 48, 248, 65, 75, 1, 70, 211, 248, 148, 32, 36, 177, 1, 44, 5, 208, 2, + 44, 6, 208, 9, 224, 34, 240, 1, 2, 6, 224, 66, 240, 3, 2, 3, 224, 34, + 240, 2, 0, 64, 240, 128, 76, 252, 255, 184, 104, 33, 0, 2, 34, 244, + 112, 16, 13, 177, 0, 245, 128, 32, 195, 248, 148, 0, 189, 232, 112, + 64, 8, 70, 114, 247, 20, 184, 3, 1, 44, 58, 52, 13, 0, 16, 181, 48, + 76, 56, 177, 0, 32, 95, 247, 2, 251, 32, 104, 64, 240, 4, 0, 32, 96, + 16, 189, 32, 104, 32, 240, 4, 0, 32, 96, 189, 232, 16, 64, 0, 32, 95, + 247, 143, 187, 3, 1, 68, 98, 52, 13, 0, 16, 181, 4, 70, 39, 72, 2, 120, + 90, 177, 1, 42, 23, 209, 33, 70, 1, 32, 255, 247, 188, 255, 79, 240, + 0, 0, 84, 177, 93, 247, 35, 249, 9, 224, 33, 70, 0, 32, 255, 247, 178, + 255, 32, 70, 189, 232, 16, 64, 210, 231, 93, 247, 67, 249, 32, 70, 189, + 232, 16, 64, 148, 231, 16, 189, 3, 1, 22, 162, 52, 13, 0, 25, 73, 2, + 123, 200, 124, 98, 243, 134, 16, 200, 116, 192, 243, 128, 16, 214, 231, + 3, 1, 20, 180, 52, 13, 0, 20, 72, 192, 124, 192, 243, 128, 16, 144, + 113, 0, 32, 80, 113, 112, 71, 3, 1, 30, 196, 52, 13, 0, 112, 181, 9, + 48, 20, 70, 197, 120, 195, 122, 1, 121, 66, 29, 40, 70, 253, 247, 142, + 250, 0, 32, 96, 113, 112, 189, 3, 1, 50, 222, 52, 13, 0, 16, 181, 144, + 249, 13, 16, 20, 70, 0, 123, 2, 240, 118, 248, 160, 113, 0, 32, 96, + 113, 76, 252, 255, 179, 105, 33, 0, 16, 189, 104, 0, 50, 0, 136, 0, + 50, 0, 0, 32, 53, 0, 0, 16, 53, 0, 96, 44, 32, 0, 24, 65, 32, 0, 3, + 1, 160, 1, 12, 53, 13, 0, 112, 181, 35, 76, 71, 242, 68, 3, 5, 70, 1, + 70, 194, 26, 32, 104, 153, 66, 48, 208, 6, 220, 161, 245, 224, 65, 63, + 57, 24, 208, 1, 41, 4, 209, 21, 224, 62, 42, 31, 208, 188, 42, 23, 208, + 45, 247, 21, 250, 8, 33, 3, 32, 113, 247, 155, 254, 32, 104, 114, 247, + 50, 249, 40, 70, 136, 247, 67, 255, 189, 232, 112, 64, 8, 33, 4, 32, + 113, 247, 143, 190, 72, 247, 225, 252, 189, 232, 112, 64, 139, 247, + 34, 188, 114, 247, 33, 249, 189, 232, 112, 64, 65, 247, 44, 190, 10, + 73, 9, 105, 0, 41, 13, 208, 189, 232, 112, 64, 8, 71, 8, 73, 2, 122, + 11, 120, 154, 26, 10, 112, 114, 247, 15, 249, 189, 232, 112, 64, 47, + 247, 208, 191, 112, 189, 0, 0, 240, 39, 32, 0, 200, 158, 32, 0, 164, + 40, 32, 0, 3, 1, 28, 168, 53, 13, 0, 16, 181, 148, 29, 82, 247, 51, + 249, 20, 248, 34, 15, 32, 240, 6, 0, 32, 112, 8, 32, 224, 113, 16, 189, + 3, 1, 20, 192, 53, 13, 0, 1, 32, 144, 113, 1, 72, 192, 123, 208, 113, + 112, 71, 24, 65, 32, 0, 3, 1, 36, 208, 53, 13, 0, 76, 252, 255, 174, + 106, 33, 0, 16, 181, 1, 70, 0, 36, 5, 72, 131, 247, 155, 249, 32, 177, + 1, 36, 71, 242, 10, 0, 136, 247, 144, 255, 32, 70, 16, 189, 12, 96, + 32, 0, 3, 1, 168, 1, 240, 53, 13, 0, 240, 181, 33, 76, 33, 75, 33, 104, + 66, 24, 154, 66, 2, 210, 8, 68, 32, 96, 240, 189, 178, 251, 243, 241, + 3, 251, 17, 32, 32, 96, 5, 32, 177, 251, 240, 247, 26, 74, 80, 104, + 8, 68, 80, 96, 1, 32, 6, 70, 19, 104, 6, 250, 0, 244, 35, 66, 3, 208, + 19, 24, 28, 122, 229, 25, 29, 114, 64, 28, 17, 40, 243, 211, 0, 32, + 2, 235, 128, 3, 28, 127, 52, 177, 92, 139, 140, 66, 1, 216, 94, 131, + 1, 224, 100, 26, 92, 131, 64, 28, 8, 40, 241, 211, 11, 72, 192, 124, + 64, 7, 209, 212, 10, 72, 0, 120, 24, 177, 9, 72, 2, 136, 10, 68, 2, + 128, 8, 72, 2, 120, 17, 68, 1, 112, 240, 189, 0, 0, 212, 35, 32, 0, + 72, 232, 1, 0, 212, 96, 32, 0, 24, 65, 32, 0, 146, 38, 32, 0, 144, 38, + 32, 0, 76, 35, 32, 0, 3, 1, 42, 148, 54, 13, 0, 16, 181, 4, 70, 0, 109, + 72, 177, 62, 74, 180, 248, 156, 16, 64, 242, 113, 35, 18, 120, 90, 67, + 81, 67, 113, 247, 109, 253, 32, 70, 189, 232, 16, 64, 76, 247, 57, 185, + 3, 1, 76, 252, 255, 169, 107, 33, 0, 162, 1, 186, 54, 13, 0, 112, 181, + 4, 70, 103, 247, 156, 249, 5, 70, 32, 70, 146, 247, 135, 254, 32, 70, + 112, 247, 186, 250, 112, 177, 148, 248, 163, 0, 192, 6, 10, 213, 224, + 105, 192, 243, 196, 0, 10, 40, 5, 209, 32, 70, 128, 247, 50, 253, 32, + 104, 96, 247, 12, 248, 224, 105, 192, 243, 196, 1, 8, 41, 3, 211, 32, + 240, 248, 0, 104, 48, 224, 97, 32, 70, 75, 247, 119, 254, 225, 105, + 36, 72, 193, 243, 192, 49, 65, 240, 14, 1, 41, 115, 148, 248, 161, 16, + 105, 115, 104, 96, 32, 72, 168, 96, 41, 70, 32, 70, 75, 247, 151, 254, + 32, 32, 113, 247, 134, 255, 5, 0, 15, 208, 34, 70, 27, 73, 113, 247, + 220, 251, 26, 72, 180, 248, 156, 16, 64, 242, 113, 34, 0, 120, 80, 67, + 65, 67, 40, 70, 113, 247, 28, 253, 37, 101, 1, 32, 112, 189, 3, 1, 88, + 88, 55, 13, 0, 112, 181, 5, 70, 12, 70, 177, 248, 3, 0, 2, 33, 111, + 247, 119, 255, 120, 177, 208, 248, 228, 16, 193, 243, 4, 33, 9, 41, + 9, 208, 97, 121, 5, 248, 161, 31, 22, 33, 105, 112, 189, 232, 112, 64, + 5, 33, 115, 247, 204, 187, 40, 70, 189, 232, 112, 64, 7, 34, 1, 33, + 120, 247, 149, 187, 55, 49, 32, 0, 171, 100, 6, 0, 167, 100, 6, 0, 209, + 99, 6, 0, 76, 252, 255, 164, 108, 33, 0, 105, 97, 13, 0, 3, 1, 72, 172, + 55, 13, 0, 16, 181, 193, 105, 193, 243, 192, 49, 177, 177, 12, 73, 2, + 142, 9, 136, 15, 42, 1, 208, 11, 4, 15, 213, 9, 75, 17, 36, 91, 104, + 27, 123, 180, 235, 83, 15, 3, 208, 15, 42, 6, 209, 137, 4, 4, 213, 0, + 104, 131, 247, 210, 249, 0, 32, 16, 189, 35, 32, 16, 189, 8, 30, 32, + 0, 164, 35, 32, 0, 3, 1, 60, 240, 55, 13, 0, 16, 181, 9, 76, 32, 33, + 9, 72, 151, 247, 193, 252, 8, 72, 113, 247, 235, 252, 32, 70, 103, 247, + 239, 253, 8, 177, 139, 247, 33, 255, 5, 73, 139, 32, 8, 96, 16, 189, + 0, 0, 200, 217, 32, 0, 136, 96, 32, 0, 168, 96, 32, 0, 236, 138, 49, + 0, 3, 1, 124, 40, 56, 13, 0, 112, 181, 4, 70, 6, 41, 3, 209, 148, 248, + 181, 0, 192, 8, 1, 208, 0, 32, 112, 189, 4, 34, 128, 33, 32, 70, 136, + 247, 190, 255, 20, 77, 3, 0, 4, 208, 104, 104, 0, 123, 192, 243, 0, + 2, 21, 224, 224, 105, 192, 243, 196, 1, 8, 41, 11, 209, 14, 73, 9, 136, + 9, 5, 17, 213, 0, 4, 15, 212, 32, 104, 112, 247, 53, 250, 94, 247, 116, + 251, 72, 177, 104, 104, 12, 35, 0, 123, 192, 243, 0, 2, 23, 33, 32, + 70, 103, 247, 5, 249, 2, 224, 32, 70, 76, 252, 255, 159, 109, 33, 0, + 137, 247, 249, 255, 1, 32, 112, 189, 0, 0, 164, 35, 32, 0, 8, 30, 32, + 0, 3, 1, 14, 160, 56, 13, 0, 17, 72, 0, 33, 192, 233, 12, 17, 112, 71, + 3, 1, 74, 170, 56, 13, 0, 112, 181, 0, 34, 15, 77, 16, 70, 17, 70, 83, + 35, 75, 67, 5, 235, 131, 3, 220, 105, 230, 2, 10, 213, 147, 248, 155, + 96, 4, 46, 6, 208, 196, 243, 196, 4, 8, 44, 2, 209, 179, 248, 100, 0, + 82, 28, 73, 28, 11, 41, 234, 219, 1, 42, 0, 208, 0, 32, 112, 189, 0, + 0, 24, 65, 32, 0, 104, 66, 32, 0, 3, 1, 32, 240, 56, 13, 0, 5, 72, 16, + 181, 128, 123, 32, 185, 139, 247, 111, 249, 8, 177, 2, 32, 16, 189, + 0, 32, 16, 189, 0, 0, 248, 91, 32, 0, 3, 1, 206, 1, 12, 57, 13, 0, 112, + 181, 53, 77, 40, 104, 128, 123, 109, 247, 111, 250, 41, 104, 201, 110, + 109, 247, 243, 249, 41, 104, 49, 78, 49, 75, 145, 248, 237, 32, 194, + 177, 145, 248, 229, 32, 154, 185, 47, 76, 209, 248, 200, 32, 36, 104, + 34, 66, 6, 208, 145, 248, 148, 64, 36, 6, 9, 212, 52, 120, 160, 66, + 6, 216, 41, 72, 42, 76, 0, 104, 36, 104, 32, 67, 2, 66, 1, 208, 156, + 120, 0, 224, 92, 120, 145, 248, 229, 0, 24, 177, 24, 92, 160, 66, 0, + 217, 76, 252, 255, 154, 110, 33, 0, 4, 70, 35, 72, 0, 104, 0, 7, 0, + 213, 220, 120, 209, 248, 192, 0, 64, 28, 22, 208, 136, 123, 109, 247, + 56, 250, 41, 104, 209, 248, 192, 16, 109, 247, 195, 249, 27, 73, 0, + 40, 7, 219, 42, 104, 79, 240, 255, 48, 194, 248, 192, 0, 63, 32, 8, + 112, 3, 224, 8, 120, 132, 66, 0, 210, 4, 70, 112, 120, 64, 177, 69, + 44, 6, 209, 40, 104, 144, 248, 168, 0, 76, 247, 169, 250, 0, 177, 15, + 36, 33, 70, 40, 104, 104, 247, 210, 252, 13, 72, 0, 120, 133, 248, 52, + 0, 112, 189, 3, 1, 58, 214, 57, 13, 0, 12, 73, 0, 235, 192, 0, 1, 235, + 128, 0, 112, 71, 0, 0, 240, 110, 32, 0, 220, 11, 33, 0, 48, 36, 32, + 0, 0, 38, 32, 0, 180, 48, 32, 0, 44, 36, 32, 0, 56, 30, 32, 0, 24, 36, + 32, 0, 32, 36, 32, 0, 120, 112, 32, 0, 3, 1, 72, 12, 58, 13, 0, 112, + 181, 4, 70, 13, 77, 109, 247, 217, 249, 128, 178, 41, 140, 109, 247, + 52, 250, 225, 139, 176, 235, 65, 15, 4, 217, 160, 123, 16, 185, 168, + 124, 46, 40, 6, 208, 113, 32, 160, 116, 5, 72, 0, 120, 132, 248, 67, + 0, 112, 189, 148, 248, 71, 0, 160, 116, 112, 189, 0, 0, 156, 91, 32, + 0, 248, 48, 32, 0, 3, 1, 82, 80, 58, 13, 0, 112, 181, 76, 252, 255, + 149, 111, 33, 0, 39, 73, 37, 76, 9, 120, 0, 41, 29, 208, 8, 48, 1, 34, + 225, 139, 130, 64, 35, 72, 17, 67, 225, 131, 144, 248, 48, 0, 46, 37, + 152, 177, 33, 73, 180, 249, 28, 0, 9, 120, 136, 66, 6, 220, 64, 66, + 136, 66, 3, 220, 148, 248, 54, 0, 0, 40, 5, 208, 32, 70, 94, 247, 182, + 250, 0, 40, 0, 208, 165, 116, 112, 189, 160, 139, 244, 231, 3, 1, 98, + 158, 58, 13, 0, 112, 181, 18, 76, 1, 34, 130, 64, 225, 139, 4, 235, + 64, 0, 17, 67, 225, 131, 0, 33, 65, 132, 15, 72, 46, 37, 144, 248, 48, + 0, 152, 177, 14, 73, 180, 249, 28, 0, 9, 120, 136, 66, 6, 220, 64, 66, + 136, 66, 3, 220, 148, 248, 54, 0, 0, 40, 5, 208, 32, 70, 94, 247, 144, + 250, 0, 40, 0, 208, 165, 116, 112, 189, 160, 139, 244, 231, 0, 0, 156, + 91, 32, 0, 31, 35, 32, 0, 248, 91, 32, 0, 32, 35, 32, 0, 3, 1, 228, + 1, 252, 58, 13, 0, 112, 181, 4, 70, 103, 247, 250, 255, 0, 38, 1, 37, + 88, 177, 63, 72, 0, 33, 6, 112, 32, 70, 156, 247, 151, 250, 32, 70, + 156, 247, 215, 250, 132, 248, 91, 80, 112, 189, 32, 70, 104, 247, 197, + 249, 0, 40, 249, 208, 32, 70, 225, 139, 156, 247, 136, 250, 160, 123, + 109, 247, 94, 249, 161, 105, 109, 247, 76, 252, 255, 144, 112, 33, 0, + 227, 248, 225, 139, 137, 30, 136, 66, 12, 216, 32, 70, 156, 247, 227, + 248, 47, 73, 8, 96, 47, 73, 8, 96, 47, 72, 5, 96, 109, 247, 53, 249, + 46, 73, 8, 96, 148, 248, 91, 0, 152, 177, 91, 247, 116, 248, 73, 247, + 159, 252, 1, 40, 11, 209, 32, 70, 90, 247, 20, 253, 56, 177, 148, 248, + 111, 0, 32, 177, 132, 248, 110, 80, 32, 70, 155, 247, 94, 248, 132, + 248, 91, 96, 148, 248, 107, 0, 232, 185, 148, 248, 40, 0, 1, 40, 13, + 208, 148, 248, 36, 0, 148, 248, 44, 16, 192, 243, 2, 0, 193, 243, 2, + 1, 136, 66, 3, 209, 148, 248, 41, 0, 2, 40, 11, 208, 32, 70, 90, 247, + 241, 252, 56, 177, 148, 248, 111, 0, 32, 177, 132, 248, 110, 80, 32, + 70, 155, 247, 59, 248, 32, 70, 189, 232, 112, 64, 156, 247, 247, 185, + 3, 1, 22, 220, 59, 13, 0, 16, 181, 4, 70, 156, 247, 87, 254, 32, 70, + 189, 232, 16, 64, 0, 240, 223, 184, 3, 1, 22, 238, 59, 13, 0, 16, 181, + 155, 247, 88, 255, 9, 73, 0, 32, 8, 112, 9, 73, 8, 128, 16, 189, 3, + 1, 48, 0, 60, 13, 0, 9, 73, 8, 72, 8, 96, 112, 71, 252, 38, 32, 0, 8, + 39, 32, 0, 160, 28, 32, 0, 156, 28, 32, 0, 164, 28, 32, 0, 200, 97, + 13, 0, 204, 97, 13, 0, 76, 252, 255, 139, 113, 33, 0, 108, 97, 13, 0, + 4, 39, 32, 0, 3, 1, 12, 44, 60, 13, 0, 49, 73, 48, 72, 8, 96, 112, 71, + 3, 1, 200, 1, 52, 60, 13, 0, 45, 233, 240, 65, 4, 70, 45, 73, 144, 248, + 86, 0, 9, 31, 69, 24, 32, 70, 103, 247, 87, 255, 0, 38, 0, 40, 32, 70, + 16, 208, 104, 247, 199, 248, 1, 39, 8, 177, 47, 112, 0, 224, 46, 112, + 160, 108, 158, 247, 152, 252, 224, 108, 158, 247, 118, 252, 132, 248, + 91, 112, 189, 232, 240, 129, 104, 247, 29, 249, 176, 177, 148, 248, + 91, 0, 24, 185, 160, 108, 144, 248, 39, 0, 80, 185, 90, 247, 228, 255, + 73, 247, 15, 252, 1, 40, 2, 209, 32, 70, 90, 247, 132, 252, 132, 248, + 91, 96, 32, 70, 189, 232, 240, 65, 90, 247, 180, 189, 32, 70, 104, 247, + 251, 248, 0, 40, 222, 208, 40, 120, 128, 177, 148, 248, 91, 0, 24, 185, + 160, 108, 144, 248, 39, 0, 72, 185, 90, 247, 198, 255, 73, 247, 241, + 251, 1, 40, 2, 209, 32, 70, 90, 247, 102, 252, 46, 112, 32, 70, 90, + 247, 153, 253, 160, 108, 158, 247, 89, 252, 224, 108, 189, 232, 240, + 65, 158, 247, 53, 188, 0, 0, 156, 97, 13, 0, 12, 39, 32, 0, 3, 1, 72, + 248, 60, 13, 0, 16, 181, 130, 247, 20, 250, 79, 244, 202, 0, 2, 110, + 74, 73, 10, 96, 66, 76, 252, 255, 134, 114, 33, 0, 110, 74, 96, 73, + 73, 10, 104, 192, 248, 96, 33, 73, 104, 192, 248, 100, 17, 71, 72, 0, + 33, 1, 112, 129, 128, 70, 73, 74, 104, 9, 104, 162, 235, 1, 1, 68, 74, + 193, 241, 255, 1, 210, 121, 161, 235, 2, 1, 129, 112, 16, 189, 3, 1, + 94, 60, 61, 13, 0, 2, 42, 40, 209, 64, 72, 22, 41, 6, 208, 19, 41, 12, + 208, 20, 41, 10, 208, 21, 41, 8, 208, 30, 224, 1, 104, 56, 74, 33, 240, + 255, 1, 146, 120, 17, 67, 1, 96, 22, 224, 2, 104, 56, 75, 34, 240, 255, + 2, 27, 120, 26, 67, 2, 96, 20, 41, 13, 209, 53, 72, 0, 104, 128, 5, + 9, 213, 52, 72, 0, 120, 48, 177, 43, 73, 8, 104, 32, 244, 124, 16, 64, + 244, 176, 16, 8, 96, 0, 32, 112, 71, 3, 1, 26, 150, 61, 13, 0, 47, 72, + 0, 104, 16, 177, 175, 242, 167, 1, 1, 96, 175, 242, 103, 0, 44, 73, + 200, 100, 112, 71, 3, 1, 188, 1, 172, 61, 13, 0, 112, 181, 64, 108, + 0, 40, 59, 208, 144, 249, 223, 0, 127, 40, 55, 208, 30, 76, 39, 75, + 1, 37, 97, 120, 73, 28, 1, 240, 15, 2, 98, 112, 33, 70, 147, 249, 0, + 96, 137, 136, 176, 66, 3, 218, 147, 249, 1, 48, 152, 66, 4, 218, 5, + 250, 2, 240, 129, 67, 161, 128, 3, 224, 5, 250, 2, 240, 76, 252, 255, + 129, 115, 33, 0, 8, 67, 160, 128, 160, 136, 73, 247, 100, 251, 33, 120, + 33, 177, 4, 40, 5, 216, 0, 32, 32, 112, 2, 224, 8, 40, 0, 211, 37, 112, + 9, 74, 16, 104, 192, 243, 5, 65, 32, 41, 9, 209, 33, 120, 1, 41, 6, + 209, 16, 73, 64, 244, 128, 0, 16, 96, 8, 96, 80, 104, 72, 96, 112, 189, + 0, 0, 180, 28, 32, 0, 188, 28, 32, 0, 200, 97, 13, 0, 144, 128, 49, + 0, 16, 30, 32, 0, 144, 139, 49, 0, 40, 37, 32, 0, 252, 50, 32, 0, 243, + 50, 32, 0, 4, 29, 32, 0, 24, 82, 32, 0, 222, 11, 33, 0, 96, 1, 101, + 0, 3, 1, 94, 100, 62, 13, 0, 91, 72, 79, 244, 128, 113, 0, 104, 1, 96, + 1, 96, 89, 72, 90, 73, 130, 104, 10, 99, 130, 106, 138, 99, 88, 75, + 194, 104, 26, 96, 88, 75, 2, 105, 26, 96, 87, 75, 66, 105, 26, 96, 87, + 75, 130, 105, 26, 96, 86, 75, 194, 105, 26, 96, 86, 75, 2, 106, 26, + 96, 66, 106, 10, 96, 84, 73, 64, 104, 8, 96, 84, 72, 1, 105, 33, 240, + 1, 1, 1, 97, 1, 104, 33, 240, 1, 1, 1, 96, 112, 71, 3, 1, 218, 1, 190, + 62, 13, 0, 112, 181, 5, 70, 173, 247, 165, 255, 76, 72, 0, 104, 67, + 76, 0, 240, 63, 0, 32, 99, 73, 72, 56, 56, 0, 104, 192, 243, 76, 252, + 255, 124, 116, 33, 0, 133, 1, 74, 17, 33, 240, 32, 0, 224, 98, 1, 42, + 4, 209, 128, 240, 31, 0, 64, 28, 64, 66, 224, 98, 62, 72, 80, 48, 0, + 104, 192, 243, 3, 48, 194, 16, 32, 240, 8, 1, 97, 99, 1, 42, 4, 209, + 129, 240, 7, 0, 64, 28, 64, 66, 96, 99, 173, 28, 232, 178, 64, 240, + 128, 1, 49, 72, 184, 56, 149, 247, 69, 254, 47, 73, 1, 32, 8, 96, 44, + 72, 1, 107, 65, 240, 207, 1, 1, 99, 79, 240, 15, 1, 129, 99, 79, 240, + 28, 1, 1, 96, 47, 72, 1, 105, 65, 240, 1, 1, 1, 97, 1, 104, 65, 240, + 1, 1, 1, 96, 36, 73, 71, 242, 193, 0, 8, 96, 35, 73, 79, 244, 192, 64, + 8, 96, 34, 72, 1, 104, 75, 246, 255, 114, 1, 234, 2, 1, 34, 104, 65, + 234, 130, 49, 1, 96, 31, 72, 1, 104, 33, 74, 33, 240, 127, 1, 18, 104, + 65, 234, 2, 1, 65, 240, 64, 1, 1, 96, 25, 73, 79, 244, 197, 64, 8, 96, + 112, 189, 3, 1, 6, 148, 63, 13, 0, 112, 71, 3, 1, 114, 150, 63, 13, + 0, 17, 73, 10, 107, 15, 72, 130, 96, 16, 74, 18, 104, 194, 96, 138, + 107, 130, 98, 14, 74, 18, 104, 2, 97, 14, 74, 18, 104, 66, 97, 13, 74, + 18, 104, 130, 97, 13, 74, 18, 104, 194, 97, 12, 74, 18, 104, 2, 98, + 9, 76, 252, 255, 119, 117, 33, 0, 104, 65, 98, 11, 73, 9, 104, 65, 96, + 112, 71, 0, 0, 208, 27, 32, 0, 212, 97, 13, 0, 200, 0, 100, 0, 188, + 1, 96, 0, 96, 4, 65, 0, 252, 4, 65, 0, 232, 6, 65, 0, 88, 4, 65, 0, + 40, 4, 65, 0, 228, 6, 65, 0, 96, 1, 101, 0, 224, 11, 33, 0, 3, 1, 58, + 4, 64, 13, 0, 248, 74, 255, 40, 2, 220, 50, 248, 16, 0, 112, 71, 255, + 33, 144, 251, 241, 241, 100, 35, 88, 67, 193, 235, 1, 35, 144, 251, + 243, 240, 178, 248, 200, 48, 50, 248, 16, 0, 50, 248, 17, 16, 192, 26, + 178, 248, 254, 49, 25, 68, 8, 68, 112, 71, 3, 1, 160, 1, 58, 64, 13, + 0, 45, 233, 240, 65, 0, 33, 234, 75, 10, 70, 8, 70, 14, 70, 79, 244, + 0, 71, 232, 77, 28, 104, 8, 224, 47, 96, 43, 104, 46, 96, 155, 4, 155, + 12, 26, 68, 0, 209, 64, 28, 73, 28, 161, 66, 244, 211, 160, 66, 3, 210, + 32, 26, 178, 251, 240, 240, 0, 224, 0, 32, 79, 244, 122, 113, 72, 67, + 27, 33, 176, 251, 241, 240, 64, 29, 10, 33, 144, 251, 241, 240, 255, + 247, 187, 255, 160, 245, 0, 64, 160, 245, 226, 80, 0, 235, 128, 0, 79, + 234, 128, 0, 66, 242, 16, 113, 144, 251, 241, 240, 211, 73, 9, 104, + 160, 235, 1, 1, 210, 72, 0, 104, 192, 76, 252, 255, 114, 118, 33, 0, + 241, 11, 0, 0, 235, 64, 0, 8, 68, 207, 73, 9, 104, 160, 235, 1, 0, 206, + 73, 9, 104, 64, 24, 1, 213, 64, 66, 64, 66, 64, 178, 189, 232, 240, + 129, 3, 1, 56, 214, 64, 13, 0, 112, 181, 4, 70, 4, 241, 40, 1, 144, + 248, 52, 0, 13, 70, 153, 247, 57, 254, 6, 70, 255, 247, 166, 255, 1, + 0, 9, 208, 48, 70, 153, 247, 121, 254, 118, 28, 41, 70, 240, 178, 153, + 247, 44, 254, 132, 248, 52, 0, 0, 32, 112, 189, 3, 1, 42, 10, 65, 13, + 0, 16, 181, 4, 70, 189, 72, 0, 104, 16, 240, 254, 15, 9, 208, 187, 72, + 135, 247, 126, 250, 24, 177, 68, 67, 79, 32, 180, 251, 240, 244, 4, + 185, 1, 36, 32, 70, 16, 189, 3, 1, 26, 48, 65, 13, 0, 182, 72, 16, 181, + 64, 136, 255, 247, 232, 255, 179, 73, 128, 0, 80, 57, 161, 248, 192, + 2, 16, 189, 3, 1, 120, 70, 65, 13, 0, 16, 181, 107, 247, 246, 253, 56, + 185, 98, 247, 142, 254, 32, 185, 131, 247, 169, 254, 8, 185, 135, 247, + 139, 249, 170, 76, 80, 60, 180, 248, 194, 2, 48, 177, 160, 241, 1, 0, + 0, 4, 0, 12, 164, 248, 194, 2, 9, 208, 166, 72, 144, 248, 59, 0, 64, + 7, 27, 213, 160, 76, 32, 104, 64, 8, 14, 209, 9, 224, 160, 72, 0, 120, + 255, 247, 188, 255, 76, 252, 255, 109, 119, 33, 0, 164, 248, 194, 2, + 189, 232, 16, 64, 135, 247, 39, 189, 157, 72, 0, 136, 64, 7, 8, 213, + 1, 34, 4, 33, 0, 32, 130, 247, 242, 252, 32, 104, 64, 240, 1, 0, 32, + 96, 16, 189, 3, 1, 122, 186, 65, 13, 0, 112, 181, 0, 37, 107, 247, 187, + 253, 145, 76, 80, 60, 104, 177, 20, 32, 153, 247, 30, 250, 135, 247, + 55, 250, 145, 72, 33, 109, 1, 37, 1, 96, 97, 109, 65, 96, 180, 248, + 88, 16, 1, 129, 98, 247, 67, 254, 16, 177, 153, 247, 238, 251, 0, 224, + 61, 177, 2, 32, 153, 247, 25, 254, 148, 248, 239, 0, 8, 177, 135, 247, + 17, 249, 131, 72, 144, 248, 59, 0, 64, 7, 16, 213, 125, 76, 32, 104, + 64, 8, 3, 209, 127, 72, 0, 136, 64, 7, 8, 213, 1, 34, 4, 33, 0, 32, + 130, 247, 183, 252, 32, 104, 64, 240, 1, 0, 32, 96, 112, 189, 3, 1, + 58, 48, 66, 13, 0, 112, 181, 120, 72, 116, 76, 117, 77, 0, 136, 164, + 241, 80, 4, 64, 7, 1, 213, 1, 32, 3, 224, 104, 136, 255, 247, 95, 255, + 128, 0, 164, 248, 192, 2, 108, 72, 0, 104, 64, 8, 2, 208, 40, 120, 255, + 247, 85, 255, 164, 248, 194, 2, 112, 189, 3, 1, 6, 102, 66, 13, 0, 112, + 71, 3, 1, 196, 3, 104, 66, 13, 0, 45, 233, 255, 71, 0, 39, 4, 70, 76, + 252, 255, 104, 120, 33, 0, 62, 70, 103, 247, 15, 254, 0, 40, 116, 208, + 108, 247, 225, 250, 0, 40, 112, 209, 148, 248, 50, 0, 2, 40, 108, 208, + 100, 72, 144, 248, 48, 0, 32, 177, 151, 247, 137, 251, 176, 245, 28, + 127, 99, 217, 160, 123, 2, 169, 108, 247, 158, 253, 2, 152, 94, 77, + 16, 240, 3, 0, 6, 208, 1, 40, 7, 208, 2, 40, 14, 208, 3, 40, 23, 209, + 2, 224, 1, 33, 2, 152, 13, 224, 40, 104, 3, 153, 64, 29, 129, 66, 6, + 210, 2, 153, 205, 233, 0, 16, 10, 224, 2, 152, 64, 28, 3, 224, 2, 33, + 2, 152, 108, 247, 227, 250, 0, 144, 40, 104, 64, 29, 1, 144, 160, 123, + 2, 171, 2, 70, 105, 70, 108, 247, 39, 252, 104, 70, 108, 247, 38, 253, + 5, 70, 223, 248, 232, 144, 148, 248, 50, 0, 223, 248, 12, 129, 169, + 241, 2, 9, 104, 177, 152, 248, 2, 16, 153, 248, 0, 0, 8, 68, 168, 66, + 2, 216, 181, 251, 240, 240, 199, 178, 0, 37, 79, 240, 2, 9, 70, 224, + 1, 32, 132, 248, 50, 0, 148, 248, 52, 0, 173, 247, 161, 253, 173, 247, + 212, 253, 152, 248, 2, 0, 152, 248, 3, 32, 153, 248, 0, 16, 131, 24, + 1, 38, 11, 68, 171, 66, 231, 210, 43, 26, 11, 68, 26, 68, 8, 68, 178, + 251, 240, 240, 64, 28, 222, 231, 62, 224, 148, 248, 52, 0, 4, 76, 252, + 255, 99, 121, 33, 0, 241, 40, 1, 153, 247, 244, 252, 128, 28, 192, 178, + 64, 240, 128, 1, 42, 72, 149, 247, 22, 252, 70, 177, 152, 248, 2, 16, + 152, 248, 3, 0, 8, 68, 73, 247, 191, 248, 0, 38, 3, 224, 152, 248, 2, + 0, 73, 247, 185, 248, 32, 70, 153, 247, 42, 253, 148, 248, 52, 0, 78, + 40, 5, 217, 132, 248, 50, 144, 32, 70, 127, 247, 12, 252, 3, 224, 109, + 28, 237, 178, 189, 66, 211, 211, 148, 248, 60, 0, 64, 28, 192, 178, + 132, 248, 60, 0, 78, 40, 10, 217, 148, 248, 50, 0, 1, 40, 6, 209, 132, + 248, 50, 144, 32, 70, 127, 247, 246, 251, 153, 247, 240, 253, 189, 232, + 255, 135, 38, 98, 13, 0, 228, 11, 33, 0, 232, 6, 65, 0, 0, 98, 13, 0, + 224, 11, 33, 0, 4, 98, 13, 0, 8, 98, 13, 0, 144, 86, 32, 0, 124, 212, + 32, 0, 168, 29, 32, 0, 24, 65, 32, 0, 180, 29, 32, 0, 221, 126, 32, + 0, 248, 91, 32, 0, 68, 43, 32, 0, 4, 1, 96, 0, 3, 1, 86, 40, 68, 13, + 0, 124, 181, 14, 70, 4, 70, 173, 247, 187, 254, 0, 37, 2, 46, 15, 208, + 4, 46, 29, 209, 148, 248, 50, 0, 0, 40, 25, 208, 89, 78, 160, 123, 105, + 70, 108, 247, 201, 252, 0, 152, 192, 67, 128, 7, 6, 208, 9, 224, 85, + 72, 0, 104, 192, 243, 2, 76, 252, 255, 94, 122, 33, 0, 16, 160, 115, + 7, 224, 1, 152, 49, 104, 136, 66, 236, 216, 173, 247, 105, 253, 173, + 247, 156, 253, 132, 248, 50, 80, 124, 189, 3, 1, 152, 1, 122, 68, 13, + 0, 16, 181, 77, 76, 0, 32, 132, 248, 60, 0, 148, 248, 64, 0, 8, 185, + 105, 247, 217, 249, 224, 142, 8, 177, 64, 30, 224, 134, 105, 247, 226, + 253, 105, 247, 24, 255, 70, 72, 127, 247, 74, 249, 32, 185, 68, 72, + 0, 104, 0, 31, 105, 247, 162, 254, 66, 72, 127, 247, 65, 249, 56, 185, + 148, 248, 59, 0, 1, 40, 3, 216, 105, 247, 127, 252, 105, 247, 241, 253, + 130, 247, 161, 249, 0, 32, 142, 247, 88, 250, 32, 104, 80, 177, 1, 124, + 4, 41, 7, 209, 56, 73, 73, 120, 33, 185, 148, 248, 59, 16, 9, 185, 255, + 247, 190, 254, 148, 248, 59, 0, 1, 40, 5, 208, 104, 247, 148, 252, 72, + 247, 107, 255, 1, 32, 16, 189, 105, 247, 27, 254, 0, 40, 247, 209, 73, + 247, 139, 250, 244, 231, 3, 1, 194, 1, 14, 69, 13, 0, 112, 181, 40, + 76, 1, 32, 132, 248, 60, 0, 105, 247, 146, 249, 0, 37, 79, 246, 255, + 112, 37, 97, 224, 134, 165, 97, 105, 247, 153, 253, 105, 247, 207, 254, + 33, 72, 127, 247, 1, 249, 32, 185, 31, 72, 0, 104, 0, 31, 105, 247, + 89, 254, 105, 247, 36, 254, 31, 72, 229, 96, 76, 252, 255, 89, 123, + 33, 0, 127, 247, 245, 248, 8, 185, 105, 247, 213, 252, 104, 247, 30, + 253, 1, 32, 142, 247, 18, 250, 32, 104, 56, 177, 1, 124, 4, 41, 4, 209, + 21, 73, 73, 120, 9, 185, 255, 247, 123, 254, 21, 72, 0, 120, 8, 177, + 252, 247, 234, 249, 1, 32, 104, 247, 57, 249, 24, 185, 13, 72, 127, + 247, 215, 248, 40, 177, 104, 247, 72, 252, 72, 247, 31, 255, 1, 32, + 112, 189, 4, 72, 1, 34, 17, 70, 3, 104, 16, 70, 91, 29, 104, 247, 44, + 249, 242, 231, 0, 0, 68, 43, 32, 0, 36, 134, 49, 0, 0, 63, 32, 0, 68, + 28, 32, 0, 60, 28, 32, 0, 168, 29, 32, 0, 52, 28, 32, 0, 201, 34, 32, + 0, 3, 1, 248, 3, 204, 69, 13, 0, 45, 233, 248, 79, 128, 79, 5, 70, 79, + 240, 0, 8, 56, 104, 32, 185, 40, 120, 0, 40, 126, 209, 112, 247, 99, + 248, 112, 247, 56, 255, 0, 144, 122, 72, 34, 33, 1, 96, 79, 244, 70, + 25, 0, 38, 201, 248, 0, 98, 4, 33, 201, 248, 4, 18, 79, 244, 72, 20, + 38, 102, 201, 248, 0, 96, 50, 32, 72, 247, 126, 255, 114, 72, 224, 101, + 79, 244, 69, 17, 79, 240, 128, 11, 193, 248, 12, 176, 200, 32, 72, 247, + 115, 255, 40, 120, 79, 244, 202, 10, 79, 244, 192, 4, 224, 177, 196, + 248, 188, 97, 105, 72, 6, 96, 212, 76, 252, 255, 84, 124, 33, 0, 248, + 252, 2, 32, 240, 12, 0, 196, 248, 252, 2, 56, 104, 72, 177, 10, 245, + 176, 112, 1, 105, 33, 240, 1, 1, 1, 97, 1, 104, 33, 240, 1, 1, 1, 96, + 0, 152, 112, 247, 254, 254, 40, 120, 52, 70, 208, 179, 156, 224, 0, + 32, 133, 247, 144, 252, 1, 33, 10, 245, 176, 112, 57, 96, 2, 105, 66, + 240, 1, 2, 2, 97, 2, 104, 66, 240, 1, 2, 2, 96, 72, 70, 201, 248, 0, + 98, 201, 248, 4, 178, 234, 120, 0, 42, 212, 248, 252, 34, 2, 208, 66, + 240, 12, 2, 3, 224, 34, 240, 12, 2, 66, 240, 8, 2, 196, 248, 252, 34, + 75, 74, 137, 70, 17, 96, 105, 120, 73, 74, 137, 30, 8, 50, 17, 96, 105, + 120, 137, 30, 18, 31, 17, 96, 70, 73, 1, 96, 0, 32, 79, 244, 122, 115, + 79, 244, 69, 18, 1, 70, 64, 28, 153, 66, 1, 224, 107, 224, 14, 224, + 2, 216, 209, 104, 9, 6, 245, 213, 79, 244, 72, 16, 79, 244, 0, 49, 1, + 102, 200, 32, 72, 247, 9, 255, 196, 248, 188, 145, 174, 231, 224, 178, + 169, 120, 64, 240, 1, 0, 96, 243, 7, 4, 6, 41, 25, 210, 223, 232, 1, + 240, 3, 7, 14, 39, 42, 46, 32, 240, 28, 0, 24, 48, 14, 224, 196, 243, + 7, 32, 64, 240, 1, 0, 96, 243, 15, 36, 9, 224, 196, 243, 7, 33, 65, + 240, 76, 252, 255, 79, 125, 33, 0, 1, 1, 97, 243, 15, 36, 64, 240, 2, + 0, 96, 243, 7, 4, 233, 120, 196, 243, 7, 32, 97, 243, 131, 0, 96, 243, + 15, 36, 40, 121, 7, 40, 15, 216, 0, 6, 128, 13, 64, 66, 64, 178, 17, + 224, 32, 240, 224, 0, 235, 231, 32, 240, 224, 0, 32, 48, 231, 231, 32, + 240, 224, 0, 160, 48, 227, 231, 8, 40, 2, 208, 9, 40, 5, 208, 8, 224, + 149, 249, 5, 0, 126, 247, 164, 248, 2, 224, 168, 121, 125, 247, 56, + 253, 128, 70, 2, 33, 64, 70, 165, 247, 223, 251, 8, 240, 255, 1, 17, + 72, 149, 247, 2, 250, 11, 72, 4, 96, 40, 120, 32, 177, 56, 104, 16, + 177, 111, 247, 245, 253, 62, 96, 1, 32, 189, 232, 248, 143, 3, 1, 48, + 192, 71, 13, 0, 16, 181, 20, 70, 12, 48, 255, 247, 1, 255, 0, 40, 1, + 209, 18, 32, 96, 113, 16, 189, 40, 100, 13, 0, 192, 4, 65, 0, 0, 2, + 12, 0, 16, 132, 49, 0, 1, 0, 128, 0, 12, 1, 96, 0, 3, 1, 36, 236, 71, + 13, 0, 16, 181, 133, 247, 8, 252, 133, 247, 249, 251, 4, 72, 1, 104, + 65, 240, 1, 1, 1, 96, 189, 232, 16, 64, 133, 247, 171, 187, 4, 44, 32, + 0, 3, 1, 184, 1, 12, 72, 13, 0, 45, 233, 240, 65, 13, 70, 38, 73, 223, + 248, 152, 192, 0, 35, 137, 120, 28, 76, 252, 255, 74, 126, 33, 0, 248, + 3, 64, 161, 66, 3, 216, 92, 30, 6, 43, 4, 210, 6, 224, 91, 28, 219, + 178, 6, 43, 243, 211, 5, 35, 4, 36, 2, 224, 11, 185, 1, 35, 0, 36, 28, + 78, 5, 235, 133, 5, 128, 177, 27, 72, 195, 235, 3, 23, 7, 68, 47, 68, + 23, 68, 151, 248, 162, 112, 247, 96, 196, 235, 4, 23, 56, 68, 40, 68, + 16, 68, 144, 248, 162, 0, 17, 224, 20, 72, 3, 235, 131, 7, 0, 235, 199, + 7, 47, 68, 23, 68, 151, 248, 109, 113, 247, 96, 4, 235, 132, 7, 0, 235, + 199, 0, 40, 68, 16, 68, 144, 248, 109, 1, 176, 96, 28, 248, 3, 0, 112, + 96, 28, 248, 4, 0, 48, 96, 5, 72, 81, 247, 208, 251, 255, 40, 0, 217, + 255, 32, 189, 232, 240, 129, 189, 30, 32, 0, 16, 19, 32, 0, 44, 81, + 32, 0, 235, 21, 32, 0, 22, 19, 32, 0, 3, 1, 194, 4, 192, 72, 13, 0, + 45, 233, 240, 79, 135, 176, 0, 38, 4, 70, 5, 150, 144, 248, 210, 0, + 252, 247, 64, 251, 128, 70, 138, 247, 153, 249, 148, 248, 210, 112, + 4, 169, 30, 55, 56, 70, 95, 247, 150, 248, 223, 248, 188, 180, 5, 0, + 10, 208, 4, 152, 0, 235, 64, 1, 219, 248, 0, 0, 0, 235, 129, 0, 6, 96, + 70, 96, 134, 96, 3, 224, 4, 168, 95, 247, 112, 248, 240, 179, 8, 32, + 76, 252, 255, 69, 127, 33, 0, 141, 248, 10, 0, 79, 240, 1, 10, 141, + 248, 11, 160, 141, 248, 7, 112, 148, 248, 208, 0, 173, 248, 0, 96, 141, + 248, 8, 0, 173, 248, 2, 96, 95, 247, 107, 249, 141, 248, 9, 0, 180, + 248, 76, 0, 79, 240, 2, 9, 64, 28, 32, 240, 1, 0, 128, 178, 173, 248, + 4, 0, 2, 40, 1, 210, 173, 248, 4, 144, 180, 248, 78, 0, 189, 248, 4, + 16, 64, 28, 32, 240, 1, 0, 136, 66, 1, 217, 64, 26, 5, 144, 148, 248, + 210, 0, 165, 247, 152, 249, 5, 153, 111, 240, 1, 2, 8, 68, 5, 144, 180, + 248, 72, 16, 2, 235, 65, 2, 130, 66, 3, 216, 72, 0, 0, 224, 18, 224, + 128, 30, 141, 248, 6, 0, 148, 248, 209, 0, 176, 177, 0, 45, 126, 208, + 180, 248, 200, 0, 173, 248, 0, 0, 180, 248, 202, 0, 173, 248, 2, 0, + 148, 248, 213, 0, 137, 224, 0, 35, 107, 34, 64, 242, 161, 49, 251, 72, + 111, 247, 142, 255, 7, 176, 189, 232, 240, 143, 1, 39, 89, 247, 253, + 253, 24, 177, 93, 247, 214, 254, 0, 185, 0, 39, 180, 248, 68, 0, 64, + 5, 5, 213, 184, 248, 0, 0, 16, 177, 173, 248, 2, 0, 9, 224, 180, 248, + 74, 0, 59, 70, 66, 0, 180, 248, 72, 0, 65, 0, 104, 70, 95, 247, 220, + 249, 189, 248, 2, 0, 1, 40, 10, 217, 233, 73, 73, 76, 252, 255, 64, + 128, 33, 0, 104, 64, 30, 177, 251, 240, 242, 0, 251, 18, 16, 32, 240, + 1, 0, 173, 248, 0, 0, 148, 248, 210, 0, 5, 170, 105, 70, 165, 247, 97, + 249, 72, 187, 180, 248, 68, 0, 64, 5, 25, 213, 184, 248, 0, 0, 176, + 177, 74, 70, 33, 70, 104, 70, 205, 248, 12, 144, 95, 247, 205, 250, + 208, 185, 82, 70, 33, 70, 104, 70, 205, 248, 12, 160, 95, 247, 197, + 250, 144, 185, 50, 70, 33, 70, 104, 70, 3, 150, 95, 247, 190, 250, 88, + 185, 3, 169, 104, 70, 95, 247, 132, 249, 48, 185, 173, 248, 0, 96, 180, + 248, 74, 0, 64, 0, 173, 248, 2, 0, 189, 248, 0, 0, 93, 177, 164, 248, + 200, 0, 189, 248, 2, 0, 164, 248, 202, 0, 157, 248, 9, 0, 132, 248, + 213, 0, 23, 224, 10, 224, 164, 248, 196, 0, 189, 248, 2, 0, 164, 248, + 198, 0, 157, 248, 9, 0, 132, 248, 212, 0, 11, 224, 180, 248, 196, 0, + 173, 248, 0, 0, 180, 248, 198, 0, 173, 248, 2, 0, 148, 248, 212, 0, + 141, 248, 9, 0, 4, 152, 219, 248, 0, 16, 0, 235, 64, 2, 1, 235, 130, + 0, 0, 154, 2, 96, 1, 154, 66, 96, 2, 154, 130, 96, 0, 45, 127, 244, + 107, 175, 4, 152, 0, 235, 64, 0, 1, 235, 128, 0, 128, 121, 132, 248, + 214, 0, 97, 231, 3, 1, 188, 2, 254, 74, 13, 0, 76, 252, 255, 59, 129, + 33, 0, 45, 233, 240, 79, 5, 70, 144, 248, 210, 0, 139, 176, 138, 70, + 144, 70, 155, 70, 30, 48, 4, 169, 94, 247, 126, 255, 0, 40, 120, 208, + 138, 247, 118, 248, 4, 152, 0, 235, 64, 1, 160, 72, 0, 104, 0, 235, + 129, 1, 8, 104, 0, 144, 72, 104, 1, 144, 136, 104, 2, 144, 12, 104, + 6, 148, 72, 104, 7, 144, 136, 104, 8, 144, 0, 32, 8, 96, 72, 96, 136, + 96, 5, 169, 104, 70, 95, 247, 248, 252, 181, 248, 78, 32, 181, 248, + 76, 16, 104, 70, 96, 247, 25, 248, 2, 37, 79, 240, 0, 9, 32, 12, 79, + 70, 9, 144, 186, 248, 2, 0, 9, 153, 64, 4, 0, 12, 173, 248, 2, 0, 129, + 66, 5, 209, 5, 152, 133, 66, 2, 210, 79, 240, 0, 9, 64, 224, 0, 38, + 184, 241, 0, 15, 1, 208, 0, 36, 30, 224, 3, 169, 104, 70, 95, 247, 235, + 248, 1, 40, 26, 209, 3, 152, 168, 66, 23, 209, 79, 240, 1, 9, 41, 224, + 11, 235, 132, 0, 189, 248, 2, 16, 0, 104, 176, 251, 241, 242, 1, 251, + 18, 0, 173, 248, 0, 0, 3, 169, 104, 70, 95, 247, 187, 252, 3, 152, 168, + 66, 234, 208, 100, 28, 68, 69, 234, 211, 189, 248, 2, 0, 128, 30, 128, + 178, 173, 248, 2, 0, 186, 248, 0, 16, 176, 235, 65, 15, 2, 211, 118, + 28, 12, 46, 203, 211, 127, 76, 252, 255, 54, 130, 33, 0, 28, 109, 30, + 3, 47, 183, 211, 185, 241, 0, 15, 4, 208, 20, 152, 3, 153, 1, 96, 3, + 224, 16, 224, 20, 153, 0, 32, 8, 96, 4, 152, 0, 235, 64, 1, 98, 72, + 0, 104, 0, 235, 129, 0, 6, 153, 1, 96, 7, 153, 65, 96, 8, 153, 129, + 96, 72, 70, 11, 176, 198, 230, 3, 1, 214, 3, 54, 76, 13, 0, 112, 181, + 134, 176, 4, 70, 137, 247, 230, 255, 0, 37, 32, 104, 3, 169, 94, 247, + 229, 254, 32, 177, 224, 105, 0, 4, 6, 213, 1, 37, 4, 224, 3, 168, 94, + 247, 200, 254, 0, 40, 122, 208, 84, 72, 0, 120, 24, 177, 224, 105, 0, + 4, 0, 213, 1, 37, 4, 32, 141, 248, 10, 0, 1, 32, 141, 248, 11, 0, 32, + 104, 141, 248, 7, 0, 32, 104, 111, 247, 43, 248, 141, 248, 8, 0, 180, + 248, 176, 0, 173, 248, 0, 0, 180, 248, 178, 0, 173, 248, 2, 0, 148, + 248, 180, 0, 141, 248, 9, 0, 33, 70, 104, 70, 94, 247, 53, 252, 189, + 248, 0, 16, 66, 78, 200, 7, 5, 209, 189, 248, 2, 0, 128, 177, 128, 30, + 129, 66, 8, 221, 79, 240, 0, 0, 0, 45, 70, 209, 173, 248, 0, 0, 189, + 248, 2, 0, 32, 177, 13, 185, 240, 120, 232, 179, 1, 37, 128, 224, 55, + 72, 0, 120, 40, 185, 180, 248, 170, 0, 180, 248, 168, 80, 168, 66, 76, + 252, 255, 49, 131, 33, 0, 4, 209, 180, 248, 168, 0, 173, 248, 2, 0, + 44, 224, 48, 120, 56, 177, 224, 105, 0, 4, 4, 212, 173, 248, 2, 80, + 164, 248, 178, 80, 39, 224, 180, 248, 188, 0, 16, 177, 133, 66, 0, 217, + 5, 70, 112, 120, 136, 177, 224, 105, 0, 4, 14, 213, 240, 136, 133, 66, + 11, 217, 94, 247, 121, 252, 64, 66, 0, 235, 128, 0, 180, 248, 170, 16, + 5, 235, 64, 0, 129, 66, 0, 210, 5, 70, 180, 248, 170, 16, 1, 35, 42, + 70, 104, 70, 95, 247, 53, 248, 189, 248, 2, 0, 1, 224, 2, 224, 85, 224, + 164, 248, 178, 0, 4, 169, 104, 70, 95, 247, 10, 248, 5, 0, 77, 208, + 176, 120, 2, 45, 3, 208, 208, 177, 1, 45, 37, 208, 51, 224, 104, 177, + 225, 105, 9, 4, 10, 212, 180, 248, 172, 16, 129, 66, 6, 210, 180, 248, + 178, 16, 242, 136, 145, 66, 1, 217, 164, 248, 172, 0, 189, 248, 0, 0, + 164, 248, 176, 0, 157, 248, 9, 0, 132, 248, 180, 0, 27, 224, 26, 224, + 80, 49, 32, 0, 7, 0, 2, 0, 0, 160, 50, 0, 71, 49, 32, 0, 232, 11, 33, + 0, 73, 49, 32, 0, 225, 105, 9, 4, 11, 212, 180, 248, 172, 16, 129, 66, + 7, 210, 180, 248, 178, 16, 242, 136, 145, 66, 2, 217, 164, 248, 172, + 0, 2, 37, 39, 73, 3, 152, 0, 34, 9, 104, 0, 76, 252, 255, 44, 132, 33, + 0, 235, 64, 0, 1, 235, 128, 0, 0, 153, 1, 96, 1, 153, 65, 96, 2, 153, + 129, 96, 4, 33, 32, 70, 149, 247, 113, 255, 40, 70, 6, 176, 112, 189, + 3, 1, 30, 8, 78, 13, 0, 29, 74, 3, 70, 8, 70, 17, 121, 0, 41, 5, 208, + 129, 66, 3, 217, 210, 136, 154, 66, 0, 210, 8, 70, 112, 71, 3, 1, 106, + 34, 78, 13, 0, 16, 181, 4, 70, 16, 0, 1, 209, 180, 248, 170, 0, 21, + 74, 18, 121, 0, 42, 33, 208, 18, 74, 82, 121, 144, 66, 29, 211, 98, + 107, 147, 7, 1, 213, 5, 35, 4, 224, 210, 7, 1, 208, 3, 35, 0, 224, 1, + 35, 180, 248, 102, 32, 20, 11, 1, 208, 91, 29, 5, 224, 18, 244, 112, + 111, 1, 208, 219, 28, 0, 224, 91, 28, 131, 66, 0, 211, 131, 30, 138, + 136, 154, 66, 0, 217, 19, 70, 139, 128, 16, 189, 80, 49, 32, 0, 232, + 11, 33, 0, 212, 29, 32, 0, 3, 1, 148, 3, 136, 78, 13, 0, 45, 233, 248, + 79, 0, 36, 38, 70, 79, 240, 1, 9, 129, 247, 238, 252, 5, 70, 76, 247, + 21, 252, 90, 79, 56, 104, 0, 240, 224, 1, 89, 72, 2, 120, 2, 240, 31, + 2, 17, 67, 57, 96, 57, 31, 10, 104, 67, 120, 2, 240, 224, 2, 3, 240, + 31, 3, 26, 67, 10, 96, 58, 29, 19, 104, 144, 248, 2, 192, 76, 252, 255, + 39, 133, 33, 0, 3, 240, 224, 3, 12, 240, 31, 12, 67, 234, 12, 3, 19, + 96, 77, 74, 19, 104, 144, 248, 3, 192, 3, 240, 224, 3, 12, 240, 31, + 12, 67, 234, 12, 3, 19, 96, 223, 248, 28, 161, 10, 241, 8, 10, 218, + 248, 0, 192, 0, 121, 12, 240, 224, 12, 0, 240, 31, 0, 76, 234, 0, 12, + 202, 248, 0, 192, 56, 104, 223, 248, 244, 192, 0, 240, 31, 0, 12, 241, + 84, 12, 12, 241, 4, 8, 3, 40, 3, 211, 128, 30, 204, 248, 0, 0, 4, 224, + 0, 35, 204, 248, 0, 48, 24, 177, 64, 30, 200, 248, 0, 0, 1, 224, 200, + 248, 0, 48, 237, 179, 4, 45, 73, 208, 16, 104, 0, 240, 31, 0, 8, 48, + 218, 248, 0, 32, 96, 243, 4, 2, 202, 248, 0, 32, 45, 75, 64, 51, 26, + 104, 0, 240, 16, 0, 34, 240, 16, 2, 2, 67, 26, 96, 69, 179, 3, 45, 55, + 208, 8, 104, 4, 45, 0, 208, 128, 30, 56, 96, 48, 247, 106, 250, 0, 40, + 62, 208, 106, 70, 2, 33, 110, 32, 48, 247, 53, 250, 189, 248, 0, 0, + 193, 178, 65, 234, 16, 32, 1, 6, 1, 213, 79, 240, 255, 57, 0, 240, 127, + 0, 0, 251, 9, 240, 64, 178, 0, 40, 41, 208, 25, 74, 2, 235, 132, 1, + 145, 249, 0, 48, 131, 66, 26, 220, 1, 224, 12, 224, 15, 224, 145, 249, + 1, 16, 129, 76, 252, 255, 34, 134, 33, 0, 66, 19, 221, 109, 177, 4, + 45, 11, 208, 2, 235, 132, 0, 144, 249, 2, 96, 15, 224, 16, 104, 0, 240, + 31, 0, 181, 231, 8, 104, 64, 30, 200, 231, 2, 235, 132, 0, 144, 249, + 3, 96, 3, 224, 100, 28, 228, 178, 9, 44, 218, 211, 56, 104, 48, 68, + 192, 178, 56, 96, 189, 232, 248, 143, 0, 0, 16, 4, 96, 0, 156, 7, 32, + 0, 0, 7, 96, 0, 240, 11, 33, 0, 3, 1, 26, 24, 80, 13, 0, 52, 72, 1, + 104, 52, 72, 1, 96, 52, 73, 9, 104, 65, 96, 52, 73, 73, 104, 129, 96, + 112, 71, 3, 1, 26, 46, 80, 13, 0, 51, 72, 1, 104, 47, 72, 1, 96, 50, + 73, 9, 104, 65, 96, 46, 73, 9, 104, 129, 96, 112, 71, 3, 1, 132, 1, + 68, 80, 13, 0, 112, 181, 47, 72, 6, 38, 0, 37, 128, 104, 46, 76, 1, + 124, 34, 41, 46, 208, 8, 220, 1, 41, 16, 208, 6, 41, 25, 208, 16, 41, + 37, 208, 33, 41, 6, 209, 39, 224, 40, 41, 23, 208, 42, 41, 27, 208, + 43, 41, 28, 208, 37, 96, 189, 232, 112, 64, 215, 231, 144, 248, 169, + 0, 28, 224, 255, 247, 200, 255, 38, 96, 112, 189, 255, 247, 207, 255, + 37, 96, 112, 189, 144, 248, 57, 0, 3, 40, 247, 209, 242, 231, 64, 143, + 67, 242, 6, 49, 8, 66, 241, 208, 236, 231, 144, 248, 76, 252, 255, 29, + 135, 33, 0, 96, 0, 6, 224, 64, 106, 228, 231, 144, 248, 101, 0, 1, 224, + 144, 248, 89, 0, 1, 40, 228, 209, 223, 231, 3, 1, 22, 196, 80, 13, 0, + 16, 181, 133, 247, 11, 248, 80, 247, 73, 255, 189, 232, 16, 64, 71, + 247, 69, 185, 3, 1, 62, 214, 80, 13, 0, 16, 181, 12, 76, 32, 120, 16, + 177, 1, 32, 71, 247, 231, 250, 0, 32, 32, 112, 16, 189, 0, 0, 12, 8, + 32, 0, 104, 1, 96, 0, 20, 8, 32, 0, 20, 12, 33, 0, 8, 8, 32, 0, 16, + 8, 32, 0, 0, 63, 32, 0, 100, 8, 100, 0, 44, 100, 13, 0, 3, 1, 22, 16, + 81, 13, 0, 16, 181, 200, 74, 200, 73, 201, 72, 80, 247, 8, 254, 200, + 73, 8, 112, 16, 189, 3, 1, 22, 34, 81, 13, 0, 197, 73, 199, 72, 220, + 57, 200, 96, 199, 73, 0, 245, 152, 96, 8, 96, 112, 71, 3, 1, 44, 52, + 81, 13, 0, 197, 74, 198, 75, 1, 40, 3, 208, 2, 40, 9, 209, 24, 136, + 6, 224, 16, 104, 24, 128, 72, 120, 1, 40, 3, 208, 67, 246, 2, 16, 16, + 96, 112, 71, 67, 246, 14, 16, 250, 231, 3, 1, 72, 92, 81, 13, 0, 16, + 181, 187, 74, 188, 76, 8, 50, 64, 246, 162, 99, 1, 40, 3, 208, 2, 40, + 18, 209, 32, 136, 15, 224, 16, 104, 128, 178, 32, 128, 73, 120, 1, 76, + 252, 255, 24, 136, 33, 0, 41, 11, 208, 173, 73, 220, 57, 201, 136, 193, + 245, 128, 81, 137, 178, 97, 243, 31, 16, 64, 240, 8, 0, 16, 96, 16, + 189, 16, 104, 99, 243, 31, 16, 247, 231, 3, 1, 112, 160, 81, 13, 0, + 112, 181, 164, 74, 164, 75, 169, 76, 18, 120, 220, 59, 2, 235, 130, + 2, 3, 235, 194, 2, 168, 77, 82, 125, 148, 60, 168, 78, 79, 244, 192, + 3, 1, 40, 9, 208, 2, 40, 6, 209, 72, 120, 1, 40, 26, 208, 48, 136, 32, + 96, 1, 32, 88, 96, 112, 189, 32, 104, 128, 178, 48, 128, 211, 248, 4, + 97, 46, 96, 73, 120, 1, 41, 9, 208, 72, 242, 255, 1, 8, 64, 2, 240, + 127, 1, 64, 234, 1, 32, 32, 96, 0, 32, 88, 96, 195, 248, 4, 33, 112, + 189, 40, 104, 195, 248, 4, 1, 112, 189, 3, 1, 60, 12, 82, 13, 0, 16, + 181, 148, 73, 148, 75, 149, 74, 149, 76, 1, 40, 6, 208, 2, 40, 3, 209, + 24, 104, 8, 96, 32, 104, 16, 96, 16, 189, 8, 104, 24, 96, 16, 104, 32, + 96, 8, 104, 32, 240, 63, 0, 64, 240, 72, 0, 8, 96, 16, 104, 32, 240, + 2, 0, 239, 231, 3, 1, 36, 68, 82, 13, 0, 138, 74, 79, 244, 192, 1, 1, + 40, 4, 208, 2, 40, 1, 209, 16, 104, 136, 97, 112, 71, 136, 105, 16, + 96, 136, 105, 32, 240, 2, 0, 247, 76, 252, 255, 19, 137, 33, 0, 231, + 3, 1, 70, 100, 82, 13, 0, 79, 244, 192, 2, 1, 40, 6, 208, 2, 40, 20, + 209, 210, 248, 252, 2, 32, 240, 12, 0, 13, 224, 72, 120, 1, 40, 13, + 208, 0, 40, 10, 209, 136, 120, 1, 40, 8, 208, 210, 248, 252, 2, 32, + 240, 12, 0, 64, 240, 8, 0, 194, 248, 252, 2, 112, 71, 210, 248, 252, + 2, 64, 240, 12, 0, 247, 231, 3, 1, 48, 166, 82, 13, 0, 105, 74, 114, + 75, 24, 50, 1, 40, 3, 208, 2, 40, 10, 209, 24, 104, 7, 224, 16, 104, + 24, 96, 72, 120, 1, 40, 16, 104, 3, 208, 64, 244, 128, 64, 16, 96, 112, + 71, 32, 244, 128, 64, 250, 231, 3, 1, 48, 210, 82, 13, 0, 105, 75, 105, + 74, 1, 40, 3, 208, 2, 40, 10, 209, 24, 104, 7, 224, 16, 104, 24, 96, + 72, 120, 1, 40, 16, 104, 3, 208, 64, 244, 128, 96, 16, 96, 112, 71, + 79, 246, 255, 49, 8, 64, 249, 231, 3, 1, 36, 254, 82, 13, 0, 90, 73, + 95, 74, 28, 57, 1, 40, 4, 208, 2, 40, 1, 209, 16, 104, 8, 96, 112, 71, + 8, 104, 16, 96, 8, 104, 0, 240, 3, 0, 247, 231, 3, 1, 152, 1, 30, 83, + 13, 0, 45, 233, 240, 65, 88, 79, 85, 78, 1, 40, 24, 208, 2, 40, 20, + 209, 48, 104, 57, 104, 32, 244, 0, 112, 33, 244, 0, 81, 76, 252, 255, + 14, 138, 33, 0, 64, 244, 128, 116, 65, 244, 128, 69, 52, 96, 61, 96, + 50, 32, 111, 247, 85, 254, 36, 244, 128, 112, 37, 244, 128, 65, 48, + 96, 57, 96, 189, 232, 240, 129, 72, 120, 1, 40, 22, 208, 48, 104, 57, + 104, 32, 244, 0, 112, 64, 244, 128, 112, 33, 244, 0, 81, 65, 244, 128, + 65, 48, 96, 57, 96, 64, 244, 0, 112, 65, 244, 0, 81, 48, 96, 57, 96, + 189, 232, 240, 65, 200, 32, 111, 247, 51, 190, 79, 244, 128, 64, 56, + 96, 48, 104, 79, 246, 255, 65, 8, 64, 48, 96, 79, 244, 192, 64, 56, + 96, 48, 104, 128, 178, 64, 244, 64, 112, 48, 96, 210, 231, 3, 1, 92, + 178, 83, 13, 0, 48, 181, 37, 74, 37, 75, 51, 77, 52, 76, 124, 58, 96, + 51, 1, 40, 9, 208, 2, 40, 6, 209, 72, 120, 1, 40, 3, 209, 40, 104, 16, + 96, 32, 104, 24, 96, 48, 189, 16, 104, 40, 96, 24, 104, 32, 96, 72, + 120, 1, 40, 247, 209, 19, 72, 19, 76, 201, 120, 0, 120, 220, 60, 0, + 235, 128, 0, 4, 235, 192, 0, 41, 177, 1, 41, 3, 208, 128, 140, 16, 96, + 0, 32, 230, 231, 192, 138, 250, 231, 3, 1, 142, 1, 10, 84, 13, 0, 30, + 74, 32, 75, 116, 58, 1, 40, 3, 208, 2, 40, 9, 209, 24, 136, 6, 224, + 16, 104, 24, 128, 72, 120, 1, 40, 3, 208, 76, 252, 255, 9, 139, 33, + 0, 79, 244, 0, 96, 16, 96, 112, 71, 37, 32, 251, 231, 0, 0, 160, 30, + 32, 0, 44, 17, 32, 0, 224, 102, 13, 0, 180, 43, 32, 0, 48, 100, 13, + 0, 188, 43, 32, 0, 172, 6, 65, 0, 40, 16, 32, 0, 38, 16, 32, 0, 44, + 16, 32, 0, 36, 16, 32, 0, 220, 4, 96, 0, 68, 16, 32, 0, 100, 6, 96, + 0, 72, 16, 32, 0, 48, 16, 32, 0, 52, 16, 32, 0, 56, 16, 32, 0, 232, + 7, 65, 0, 76, 16, 32, 0, 252, 4, 65, 0, 60, 16, 32, 0, 64, 16, 32, 0, + 42, 16, 32, 0, 3, 1, 134, 1, 148, 84, 13, 0, 0, 33, 16, 181, 97, 243, + 15, 32, 32, 240, 2, 0, 64, 240, 1, 4, 224, 178, 87, 247, 212, 254, 1, + 32, 96, 243, 15, 36, 4, 240, 254, 0, 87, 247, 205, 254, 60, 247, 248, + 249, 72, 179, 66, 73, 69, 32, 8, 96, 65, 72, 1, 120, 65, 72, 0, 41, + 208, 248, 164, 16, 15, 208, 33, 244, 124, 81, 65, 244, 248, 81, 192, + 248, 164, 16, 1, 104, 33, 244, 112, 33, 65, 244, 0, 33, 1, 96, 65, 109, + 33, 240, 1, 1, 14, 224, 33, 240, 63, 1, 65, 240, 31, 1, 192, 248, 164, + 16, 1, 104, 33, 240, 112, 97, 65, 240, 0, 97, 1, 96, 65, 109, 33, 244, + 128, 49, 65, 101, 0, 32, 16, 189, 3, 1, 198, 76, 252, 255, 4, 140, 33, + 0, 1, 22, 85, 13, 0, 2, 70, 48, 180, 0, 32, 17, 42, 81, 210, 223, 232, + 2, 240, 9, 73, 70, 61, 58, 40, 11, 68, 14, 68, 70, 58, 73, 73, 40, 40, + 77, 0, 48, 188, 172, 231, 48, 188, 87, 247, 3, 190, 35, 74, 19, 104, + 111, 243, 15, 3, 66, 248, 144, 57, 31, 76, 33, 75, 5, 41, 15, 210, 223, + 232, 1, 240, 16, 3, 16, 22, 16, 0, 2, 241, 124, 2, 81, 105, 72, 246, + 136, 3, 65, 234, 3, 1, 81, 97, 79, 240, 187, 49, 17, 96, 48, 188, 112, + 71, 25, 104, 9, 177, 209, 103, 249, 231, 97, 104, 251, 231, 82, 248, + 124, 31, 25, 96, 161, 104, 17, 96, 81, 105, 99, 136, 25, 67, 81, 97, + 237, 231, 48, 188, 87, 247, 230, 189, 17, 177, 48, 188, 87, 247, 22, + 190, 48, 188, 87, 247, 51, 190, 2, 32, 225, 231, 48, 188, 87, 247, 231, + 189, 48, 188, 8, 70, 87, 247, 74, 190, 48, 188, 87, 247, 249, 189, 1, + 32, 213, 231, 0, 132, 49, 0, 28, 12, 33, 0, 144, 0, 50, 0, 16, 105, + 13, 0, 3, 1, 168, 2, 216, 85, 13, 0, 45, 233, 240, 65, 3, 0, 2, 208, + 60, 76, 6, 34, 2, 224, 59, 76, 40, 60, 20, 34, 148, 249, 0, 0, 0, 37, + 136, 66, 29, 221, 43, 185, 148, 249, 10, 0, 136, 66, 1, 219, 5, 37, + 22, 224, 76, 252, 255, 255, 140, 33, 0, 4, 235, 66, 0, 16, 249, 2, 12, + 136, 66, 2, 219, 82, 30, 213, 178, 13, 224, 1, 32, 9, 224, 4, 235, 64, + 6, 150, 249, 0, 96, 142, 66, 1, 220, 5, 70, 3, 224, 64, 28, 192, 178, + 144, 66, 243, 211, 4, 235, 69, 0, 144, 249, 0, 112, 27, 177, 38, 73, + 64, 120, 8, 96, 60, 224, 37, 73, 38, 78, 137, 121, 143, 66, 1, 221, + 1, 32, 0, 224, 0, 32, 112, 112, 129, 247, 13, 249, 48, 112, 8, 32, 240, + 112, 223, 248, 112, 192, 176, 112, 0, 32, 12, 241, 12, 12, 5, 235, 64, + 1, 4, 235, 65, 3, 6, 235, 64, 1, 26, 120, 10, 117, 10, 113, 72, 117, + 72, 113, 92, 248, 32, 32, 89, 120, 17, 96, 1, 40, 4, 208, 2, 40, 9, + 208, 3, 40, 14, 209, 21, 224, 220, 248, 4, 16, 9, 104, 17, 74, 17, 96, + 17, 74, 5, 224, 220, 248, 8, 16, 9, 104, 15, 74, 17, 96, 15, 74, 17, + 96, 64, 28, 177, 120, 192, 178, 129, 66, 214, 216, 56, 70, 189, 232, + 240, 129, 220, 248, 12, 16, 9, 104, 10, 74, 17, 96, 10, 74, 239, 231, + 0, 0, 60, 105, 13, 0, 156, 1, 96, 0, 75, 30, 32, 0, 148, 23, 32, 0, + 12, 8, 32, 0, 8, 8, 32, 0, 20, 8, 32, 0, 16, 8, 32, 0, 24, 12, 33, 0, + 20, 12, 33, 0, 3, 1, 48, 76, 252, 255, 250, 141, 33, 0, 252, 86, 13, + 0, 112, 181, 193, 23, 0, 235, 209, 97, 76, 17, 33, 240, 31, 1, 69, 26, + 111, 247, 165, 254, 79, 240, 224, 34, 1, 33, 2, 235, 132, 2, 169, 64, + 194, 248, 128, 17, 189, 232, 112, 64, 111, 247, 157, 190, 3, 1, 94, + 40, 87, 13, 0, 105, 75, 48, 181, 24, 68, 131, 7, 10, 213, 80, 248, 2, + 60, 137, 30, 27, 12, 128, 28, 19, 112, 27, 10, 83, 112, 137, 178, 2, + 241, 2, 2, 79, 234, 145, 4, 13, 224, 80, 248, 4, 59, 19, 112, 79, 234, + 19, 37, 85, 112, 79, 234, 19, 69, 149, 112, 79, 234, 19, 99, 211, 112, + 2, 241, 4, 2, 35, 0, 164, 241, 1, 4, 164, 178, 236, 209, 137, 7, 3, + 213, 0, 104, 16, 112, 0, 10, 80, 112, 48, 189, 3, 1, 126, 130, 87, 13, + 0, 14, 181, 83, 72, 0, 120, 1, 40, 54, 209, 82, 72, 0, 104, 82, 73, + 0, 240, 4, 0, 9, 120, 8, 67, 46, 209, 47, 247, 90, 254, 0, 40, 42, 208, + 106, 70, 10, 33, 0, 32, 255, 247, 189, 255, 157, 248, 0, 0, 80, 40, + 33, 209, 157, 248, 1, 0, 79, 40, 29, 209, 157, 248, 2, 0, 0, 40, 25, + 208, 157, 248, 3, 0, 0, 40, 21, 208, 157, 248, 4, 0, 120, 185, 157, + 248, 5, 0, 96, 185, 157, 248, 6, 0, 72, 185, 157, 248, 7, 0, 48, 76, + 252, 255, 245, 142, 33, 0, 185, 157, 248, 8, 0, 24, 185, 157, 248, 9, + 0, 0, 40, 2, 208, 1, 168, 109, 247, 25, 254, 14, 189, 3, 1, 106, 252, + 87, 13, 0, 112, 181, 4, 40, 45, 209, 56, 73, 54, 72, 8, 96, 56, 73, + 55, 72, 8, 96, 57, 73, 55, 72, 8, 96, 15, 32, 255, 247, 113, 255, 56, + 73, 54, 72, 1, 37, 8, 96, 55, 72, 79, 240, 255, 49, 129, 96, 54, 73, + 13, 96, 8, 33, 193, 112, 54, 73, 52, 72, 72, 96, 255, 247, 163, 255, + 251, 247, 38, 253, 51, 73, 36, 76, 8, 96, 51, 73, 96, 104, 8, 96, 254, + 247, 163, 251, 96, 120, 32, 177, 48, 72, 133, 96, 21, 32, 166, 247, + 124, 254, 0, 32, 112, 189, 3, 1, 12, 98, 88, 13, 0, 4, 33, 8, 32, 87, + 247, 141, 189, 3, 1, 12, 106, 88, 13, 0, 3, 33, 8, 32, 87, 247, 137, + 189, 3, 1, 218, 1, 114, 88, 13, 0, 16, 181, 175, 242, 123, 0, 40, 73, + 8, 96, 255, 247, 81, 252, 39, 73, 29, 32, 72, 112, 175, 242, 29, 1, + 38, 72, 65, 96, 175, 242, 45, 1, 129, 96, 70, 247, 136, 248, 36, 73, + 35, 72, 80, 34, 8, 96, 36, 73, 35, 72, 48, 35, 8, 96, 36, 72, 35, 73, + 193, 103, 36, 73, 129, 103, 36, 72, 12, 33, 65, 128, 2, 113, 5, 33, + 65, 113, 195, 128, 2, 114, 65, 76, 252, 255, 240, 143, 33, 0, 114, 37, + 33, 1, 115, 3, 33, 65, 115, 16, 189, 0, 0, 126, 17, 101, 0, 40, 12, + 33, 0, 128, 1, 50, 0, 78, 5, 32, 0, 225, 90, 13, 0, 136, 35, 32, 0, + 105, 91, 13, 0, 196, 35, 32, 0, 109, 91, 13, 0, 252, 37, 32, 0, 81, + 89, 13, 0, 84, 50, 32, 0, 16, 130, 32, 0, 32, 39, 32, 0, 241, 56, 13, + 0, 228, 92, 32, 0, 136, 50, 32, 0, 228, 6, 65, 0, 0, 144, 50, 0, 180, + 57, 32, 0, 179, 50, 32, 0, 232, 123, 13, 0, 41, 68, 13, 0, 188, 48, + 32, 0, 103, 66, 13, 0, 192, 48, 32, 0, 15, 69, 13, 0, 24, 82, 32, 0, + 123, 68, 13, 0, 156, 24, 32, 0, 3, 1, 12, 72, 89, 13, 0, 98, 73, 0, + 123, 8, 112, 112, 71, 3, 1, 148, 3, 80, 89, 13, 0, 240, 180, 0, 36, + 96, 78, 12, 96, 166, 241, 128, 4, 5, 43, 110, 208, 8, 220, 1, 43, 13, + 208, 2, 43, 105, 208, 3, 43, 22, 208, 4, 43, 101, 209, 32, 224, 6, 43, + 98, 208, 8, 43, 41, 208, 63, 43, 94, 209, 76, 224, 9, 42, 2, 208, 15, + 42, 89, 209, 3, 224, 52, 105, 12, 96, 116, 105, 150, 224, 180, 105, + 12, 96, 244, 105, 146, 224, 3, 42, 2, 208, 63, 42, 76, 209, 3, 224, + 37, 105, 13, 96, 100, 105, 137, 224, 165, 76, 252, 255, 235, 144, 33, + 0, 109, 13, 96, 228, 109, 133, 224, 2, 42, 2, 208, 12, 42, 63, 209, + 3, 224, 37, 104, 13, 96, 100, 104, 124, 224, 165, 104, 13, 96, 228, + 104, 120, 224, 18, 42, 23, 208, 6, 220, 13, 42, 24, 208, 14, 42, 26, + 208, 16, 42, 115, 209, 11, 224, 23, 42, 5, 208, 28, 42, 110, 209, 165, + 107, 13, 96, 228, 107, 102, 224, 165, 108, 13, 96, 228, 108, 98, 224, + 165, 111, 13, 96, 228, 111, 94, 224, 52, 104, 12, 96, 116, 104, 90, + 224, 52, 106, 12, 96, 116, 106, 86, 224, 180, 106, 12, 96, 244, 106, + 82, 224, 64, 242, 63, 23, 162, 242, 63, 21, 186, 66, 65, 208, 15, 220, + 36, 42, 34, 208, 7, 220, 20, 42, 39, 208, 25, 42, 21, 208, 26, 42, 70, + 209, 22, 224, 68, 224, 37, 42, 27, 208, 133, 42, 64, 209, 32, 224, 20, + 45, 34, 208, 4, 220, 1, 45, 47, 208, 2, 45, 56, 209, 44, 224, 24, 45, + 30, 208, 138, 45, 51, 209, 43, 224, 165, 105, 13, 96, 228, 105, 42, + 224, 37, 106, 13, 96, 100, 106, 38, 224, 165, 106, 13, 96, 228, 106, + 34, 224, 37, 107, 13, 96, 100, 107, 30, 224, 37, 108, 13, 96, 100, 108, + 26, 224, 37, 109, 13, 96, 100, 109, 22, 224, 165, 110, 13, 96, 228, + 110, 18, 224, 15, 77, 45, 120, 1, 45, 18, 209, 37, 110, 13, 96, 100, + 110, 76, 252, 255, 230, 145, 33, 0, 10, 224, 180, 104, 12, 96, 244, + 104, 6, 224, 37, 111, 13, 96, 100, 111, 2, 224, 52, 107, 12, 96, 116, + 107, 76, 96, 12, 104, 0, 44, 2, 209, 240, 188, 70, 247, 170, 186, 240, + 188, 112, 71, 50, 12, 33, 0, 232, 105, 13, 0, 217, 11, 33, 0, 3, 1, + 140, 1, 224, 90, 13, 0, 112, 181, 4, 70, 1, 41, 2, 208, 2, 41, 47, 208, + 48, 224, 164, 245, 224, 64, 10, 56, 33, 209, 23, 72, 129, 247, 25, 248, + 4, 70, 22, 77, 22, 78, 14, 224, 20, 73, 19, 72, 128, 247, 92, 255, 41, + 136, 11, 41, 2, 209, 40, 121, 2, 40, 8, 208, 6, 235, 129, 0, 1, 104, + 14, 72, 136, 71, 100, 30, 238, 210, 0, 36, 18, 224, 11, 72, 157, 247, + 184, 248, 11, 73, 16, 32, 251, 247, 34, 249, 243, 231, 164, 245, 224, + 64, 6, 56, 6, 208, 14, 56, 4, 209, 7, 73, 8, 112, 236, 231, 137, 247, + 46, 249, 32, 70, 112, 189, 12, 96, 32, 0, 164, 35, 32, 0, 60, 146, 8, + 0, 92, 239, 32, 0, 104, 97, 13, 0, 3, 1, 8, 104, 91, 13, 0, 0, 32, 112, + 71, 3, 1, 28, 108, 91, 13, 0, 8, 123, 66, 8, 0, 32, 127, 42, 3, 208, + 7, 42, 1, 209, 1, 74, 138, 96, 112, 71, 149, 54, 13, 0, 3, 1, 80, 132, + 91, 13, 0, 240, 181, 17, 73, 76, 252, 255, 225, 146, 33, 0, 15, 72, + 15, 78, 72, 97, 0, 32, 54, 29, 1, 39, 86, 248, 48, 48, 90, 9, 3, 240, + 31, 5, 81, 248, 34, 64, 7, 250, 5, 243, 28, 67, 65, 248, 34, 64, 6, + 235, 192, 2, 75, 105, 82, 104, 3, 235, 64, 3, 66, 240, 1, 2, 194, 245, + 88, 34, 26, 128, 64, 28, 230, 208, 240, 189, 32, 106, 13, 0, 108, 159, + 32, 0, 3, 1, 128, 1, 208, 91, 13, 0, 45, 233, 240, 65, 26, 72, 0, 104, + 192, 7, 46, 208, 25, 72, 1, 104, 65, 240, 1, 1, 1, 96, 23, 79, 124, + 63, 56, 104, 64, 240, 128, 0, 56, 96, 21, 78, 1, 32, 48, 96, 69, 247, + 192, 249, 61, 104, 37, 240, 128, 0, 56, 96, 15, 72, 116, 56, 1, 104, + 65, 240, 32, 1, 1, 96, 1, 104, 33, 240, 32, 1, 1, 96, 0, 36, 4, 224, + 48, 32, 69, 247, 25, 249, 4, 241, 1, 4, 48, 104, 128, 7, 1, 212, 50, + 44, 245, 211, 69, 240, 128, 0, 56, 96, 0, 32, 48, 96, 189, 232, 240, + 129, 0, 0, 96, 24, 32, 0, 124, 8, 100, 0, 180, 4, 50, 0, 3, 1, 136, + 1, 76, 92, 13, 0, 48, 181, 27, 76, 36, 120, 1, 44, 7, 209, 176, 245, + 225, 63, 7, 208, 24, 76, 37, 104, 69, 240, 1, 5, 37, 96, 23, 76, 160, + 66, 1, 216, 22, 76, 0, 224, 22, 76, 180, 76, 252, 255, 220, 147, 33, + 0, 251, 240, 240, 16, 40, 12, 219, 196, 23, 0, 235, 20, 116, 37, 17, + 36, 240, 15, 4, 4, 27, 24, 104, 32, 240, 8, 0, 64, 240, 128, 0, 6, 224, + 5, 70, 24, 104, 0, 36, 32, 240, 128, 0, 64, 240, 8, 0, 24, 96, 197, + 245, 128, 112, 16, 96, 4, 235, 212, 112, 64, 16, 34, 26, 66, 234, 0, + 16, 8, 96, 48, 189, 0, 0, 48, 12, 33, 0, 28, 4, 54, 0, 96, 227, 22, + 0, 0, 54, 110, 1, 0, 108, 220, 2, 3, 1, 50, 208, 92, 13, 0, 112, 181, + 4, 70, 0, 37, 111, 247, 192, 251, 6, 70, 32, 70, 111, 247, 148, 252, + 4, 0, 6, 208, 1, 33, 111, 247, 119, 252, 5, 70, 32, 70, 111, 247, 109, + 252, 48, 70, 111, 247, 180, 251, 40, 70, 112, 189, 3, 1, 62, 254, 92, + 13, 0, 112, 181, 4, 70, 0, 37, 111, 247, 169, 251, 6, 70, 32, 70, 111, + 247, 125, 252, 4, 0, 7, 208, 0, 33, 111, 247, 96, 252, 5, 70, 32, 70, + 111, 247, 86, 252, 4, 224, 203, 33, 79, 244, 0, 112, 110, 247, 62, 255, + 48, 70, 111, 247, 151, 251, 40, 70, 112, 189, 3, 1, 62, 56, 93, 13, + 0, 112, 181, 5, 0, 22, 72, 4, 104, 22, 208, 12, 224, 41, 70, 32, 70, + 111, 247, 36, 253, 48, 177, 68, 177, 41, 70, 32, 70, 189, 232, 112, + 64, 111, 76, 252, 255, 215, 148, 33, 0, 247, 249, 188, 36, 104, 0, 44, + 240, 209, 189, 232, 112, 64, 254, 33, 79, 244, 0, 112, 110, 247, 29, + 191, 112, 189, 3, 1, 50, 114, 93, 13, 0, 112, 181, 9, 77, 1, 70, 1, + 36, 40, 120, 80, 177, 8, 70, 111, 247, 67, 252, 40, 177, 1, 124, 64, + 124, 42, 120, 80, 67, 129, 66, 0, 210, 0, 36, 32, 70, 112, 189, 132, + 5, 32, 0, 49, 12, 33, 0, 3, 1, 40, 160, 93, 13, 0, 6, 73, 0, 32, 9, + 104, 201, 6, 6, 213, 5, 72, 1, 104, 33, 244, 112, 49, 1, 96, 79, 244, + 112, 32, 112, 71, 0, 0, 44, 106, 13, 0, 88, 30, 32, 0, 3, 1, 60, 196, + 93, 13, 0, 112, 181, 5, 70, 12, 70, 128, 106, 8, 33, 1, 235, 128, 0, + 111, 247, 51, 252, 0, 40, 15, 208, 170, 106, 0, 241, 8, 1, 2, 42, 3, + 209, 84, 248, 4, 43, 65, 248, 4, 43, 34, 104, 10, 96, 1, 70, 40, 70, + 124, 247, 233, 255, 1, 32, 112, 189, 3, 1, 112, 252, 93, 13, 0, 112, + 181, 22, 76, 160, 120, 0, 40, 38, 208, 111, 247, 19, 249, 1, 70, 19, + 72, 0, 104, 45, 247, 38, 248, 161, 120, 64, 246, 53, 66, 81, 67, 192, + 235, 129, 4, 111, 247, 27, 251, 14, 77, 6, 70, 40, 120, 192, 6, 13, + 213, 0, 44, 11, 220, 45, 247, 90, 248, 32, 185, 76, 252, 255, 210, 149, + 33, 0, 10, 72, 1, 104, 33, 240, 32, 1, 1, 96, 40, 120, 32, 240, 16, + 0, 40, 112, 48, 70, 189, 232, 112, 64, 111, 247, 7, 187, 112, 189, 0, + 0, 196, 24, 32, 0, 48, 106, 13, 0, 22, 29, 32, 0, 32, 4, 54, 0, 3, 1, + 88, 104, 94, 13, 0, 208, 248, 216, 32, 4, 70, 0, 33, 144, 71, 66, 78, + 223, 248, 8, 129, 223, 248, 8, 145, 4, 241, 176, 10, 80, 70, 125, 247, + 4, 248, 5, 70, 112, 121, 136, 177, 176, 120, 120, 177, 111, 247, 227, + 250, 152, 248, 0, 16, 7, 70, 65, 240, 16, 1, 136, 248, 0, 16, 111, 247, + 197, 248, 201, 248, 0, 0, 56, 70, 111, 247, 217, 250, 212, 248, 216, + 32, 41, 70, 32, 70, 144, 71, 225, 231, 3, 1, 24, 188, 94, 13, 0, 47, + 72, 16, 181, 64, 121, 24, 177, 45, 247, 17, 248, 0, 40, 0, 208, 1, 32, + 16, 189, 3, 1, 192, 1, 208, 94, 13, 0, 45, 233, 240, 65, 223, 248, 176, + 128, 14, 70, 152, 248, 0, 0, 224, 179, 230, 179, 192, 7, 61, 208, 113, + 104, 6, 241, 8, 0, 161, 245, 224, 66, 132, 58, 15, 209, 69, 136, 4, + 70, 5, 241, 9, 0, 111, 247, 158, 251, 7, 70, 42, 70, 33, 29, 9, 48, + 111, 247, 140, 252, 60, 70, 71, 242, 63, 0, 29, 224, 161, 245, 224, + 66, 65, 58, 34, 209, 5, 76, 252, 255, 205, 150, 33, 0, 70, 253, 247, + 196, 252, 7, 0, 29, 208, 40, 120, 19, 40, 26, 208, 104, 120, 0, 29, + 63, 247, 33, 249, 105, 120, 160, 241, 8, 4, 137, 28, 65, 128, 32, 248, + 4, 123, 106, 120, 41, 70, 146, 28, 111, 247, 108, 252, 71, 242, 130, + 0, 96, 96, 85, 247, 127, 252, 33, 70, 1, 224, 12, 224, 1, 224, 45, 247, + 254, 248, 152, 248, 0, 0, 64, 7, 5, 213, 48, 70, 111, 247, 31, 252, + 0, 32, 189, 232, 240, 129, 1, 32, 251, 231, 0, 0, 196, 24, 32, 0, 22, + 29, 32, 0, 48, 106, 13, 0, 50, 12, 33, 0, 3, 1, 58, 140, 95, 13, 0, + 29, 73, 48, 180, 10, 104, 106, 177, 1, 70, 161, 251, 2, 5, 0, 35, 3, + 251, 2, 82, 1, 251, 3, 33, 24, 74, 25, 75, 18, 104, 27, 120, 90, 67, + 4, 224, 64, 246, 235, 49, 160, 251, 1, 1, 100, 34, 48, 188, 0, 35, 85, + 247, 95, 186, 3, 1, 82, 194, 95, 13, 0, 240, 180, 15, 74, 18, 104, 106, + 177, 15, 75, 28, 104, 15, 75, 27, 120, 92, 67, 3, 70, 164, 251, 3, 6, + 0, 37, 5, 251, 3, 99, 4, 251, 1, 49, 10, 224, 100, 34, 3, 70, 163, 251, + 2, 5, 1, 251, 2, 81, 0, 36, 3, 251, 4, 17, 64, 246, 235, 50, 240, 188, + 0, 35, 85, 247, 62, 186, 228, 24, 32, 0, 224, 24, 76, 252, 255, 200, + 151, 33, 0, 32, 0, 217, 24, 32, 0, 3, 1, 80, 16, 96, 13, 0, 16, 181, + 4, 70, 69, 247, 46, 249, 12, 73, 2, 40, 8, 112, 34, 106, 17, 208, 79, + 244, 128, 113, 10, 67, 34, 98, 9, 73, 9, 74, 9, 104, 18, 120, 81, 67, + 64, 246, 235, 50, 81, 67, 100, 34, 177, 251, 242, 241, 5, 74, 17, 96, + 16, 189, 128, 33, 237, 231, 0, 0, 136, 25, 32, 0, 224, 24, 32, 0, 217, + 24, 32, 0, 228, 24, 32, 0, 16, 1, 15, 0, 36, 198, 2, 0, 164, 240, 8, + 185, 0, 0, 56, 8, 13, 0, 16, 1, 15, 1, 120, 204, 2, 0, 163, 240, 194, + 186, 0, 0, 0, 2, 13, 0, 16, 1, 15, 2, 40, 219, 3, 0, 146, 240, 116, + 187, 0, 0, 20, 2, 13, 0, 16, 1, 15, 3, 84, 220, 3, 0, 146, 240, 230, + 186, 0, 0, 36, 2, 13, 0, 16, 1, 15, 4, 80, 204, 3, 0, 147, 240, 240, + 186, 0, 0, 52, 2, 13, 0, 16, 1, 15, 5, 220, 210, 3, 0, 146, 240, 180, + 191, 0, 0, 72, 2, 13, 0, 16, 1, 15, 6, 44, 207, 3, 0, 147, 240, 148, + 185, 0, 0, 88, 2, 13, 0, 16, 1, 15, 7, 36, 182, 3, 0, 148, 240, 36, + 190, 0, 0, 112, 2, 13, 0, 16, 1, 15, 8, 112, 27, 8, 0, 78, 240, 132, + 187, 0, 0, 124, 2, 13, 0, 76, 252, 255, 195, 152, 33, 0, 16, 1, 15, + 9, 84, 133, 1, 0, 184, 240, 148, 186, 0, 0, 128, 10, 13, 0, 16, 1, 15, + 10, 188, 146, 7, 0, 86, 240, 236, 191, 0, 0, 152, 2, 13, 0, 16, 1, 15, + 11, 4, 137, 7, 0, 87, 240, 205, 188, 0, 0, 162, 2, 13, 0, 16, 1, 15, + 12, 188, 132, 7, 0, 87, 240, 247, 190, 0, 0, 174, 2, 13, 0, 16, 1, 15, + 13, 140, 139, 7, 0, 87, 240, 151, 187, 0, 0, 190, 2, 13, 0, 16, 1, 15, + 14, 192, 55, 8, 0, 112, 189, 0, 0, 0, 0, 0, 0, 0, 0, 16, 1, 15, 15, + 176, 55, 8, 0, 3, 41, 248, 210, 0, 0, 0, 0, 0, 0, 16, 1, 15, 16, 104, + 60, 7, 0, 92, 240, 154, 191, 0, 0, 160, 11, 13, 0, 16, 1, 15, 17, 148, + 41, 7, 0, 94, 240, 205, 185, 0, 0, 50, 13, 13, 0, 16, 1, 15, 18, 112, + 57, 7, 0, 92, 240, 170, 188, 0, 0, 200, 2, 13, 0, 16, 1, 15, 19, 116, + 64, 7, 0, 92, 240, 49, 185, 0, 0, 218, 2, 13, 0, 16, 1, 15, 20, 140, + 69, 7, 0, 91, 240, 176, 190, 0, 0, 240, 2, 13, 0, 16, 1, 15, 21, 192, + 51, 7, 0, 92, 240, 160, 191, 0, 0, 4, 3, 13, 0, 16, 1, 15, 22, 64, 52, + 7, 0, 93, 240, 150, 188, 0, 0, 112, 13, 13, 76, 252, 255, 190, 153, + 33, 0, 0, 16, 1, 15, 23, 172, 166, 3, 0, 149, 240, 46, 190, 0, 0, 12, + 3, 13, 0, 16, 1, 15, 24, 112, 39, 4, 0, 141, 240, 210, 189, 0, 0, 24, + 3, 13, 0, 6, 1, 4, 112, 15, 13, 0, 16, 1, 15, 25, 204, 84, 3, 0, 2, + 33, 0, 224, 0, 0, 0, 0, 0, 0, 16, 1, 15, 26, 200, 85, 3, 0, 154, 240, + 170, 190, 0, 0, 32, 3, 13, 0, 16, 1, 15, 27, 96, 82, 3, 0, 155, 240, + 101, 184, 0, 0, 46, 3, 13, 0, 16, 1, 15, 28, 128, 109, 3, 0, 153, 240, + 222, 186, 0, 0, 64, 3, 13, 0, 16, 1, 15, 29, 76, 92, 3, 0, 154, 240, + 128, 187, 0, 0, 80, 3, 13, 0, 16, 1, 15, 30, 216, 80, 3, 0, 155, 240, + 66, 185, 0, 0, 96, 3, 13, 0, 6, 1, 4, 4, 18, 13, 0, 16, 1, 15, 31, 60, + 94, 7, 0, 90, 240, 154, 186, 0, 0, 116, 3, 13, 0, 6, 1, 4, 240, 19, + 13, 0, 16, 1, 15, 32, 148, 123, 7, 0, 88, 240, 246, 187, 0, 0, 132, + 3, 13, 0, 6, 1, 4, 76, 20, 13, 0, 16, 1, 15, 33, 212, 205, 7, 0, 83, + 240, 222, 186, 0, 0, 148, 3, 13, 0, 16, 1, 15, 34, 184, 13, 7, 0, 0, + 0, 139, 73, 0, 0, 0, 0, 0, 0, 16, 1, 15, 35, 212, 22, 76, 252, 255, + 185, 154, 33, 0, 7, 0, 94, 240, 102, 190, 0, 0, 164, 3, 13, 0, 16, 1, + 15, 36, 44, 154, 7, 0, 87, 240, 216, 189, 0, 0, 224, 21, 13, 0, 16, + 1, 15, 37, 144, 231, 7, 0, 83, 240, 148, 189, 0, 0, 188, 34, 13, 0, + 16, 1, 15, 38, 36, 232, 7, 0, 81, 240, 198, 189, 0, 0, 180, 3, 13, 0, + 16, 1, 15, 39, 104, 240, 7, 0, 83, 240, 83, 185, 0, 0, 18, 35, 13, 0, + 16, 1, 15, 40, 240, 61, 6, 0, 108, 240, 228, 186, 0, 0, 188, 3, 13, + 0, 16, 1, 15, 41, 4, 58, 6, 0, 108, 240, 229, 188, 0, 0, 210, 3, 13, + 0, 16, 1, 15, 42, 100, 112, 6, 0, 107, 240, 136, 186, 0, 0, 120, 37, + 13, 0, 16, 1, 15, 43, 252, 107, 6, 0, 105, 240, 242, 187, 0, 0, 228, + 3, 13, 0, 16, 1, 15, 44, 204, 108, 6, 0, 107, 240, 58, 189, 0, 0, 68, + 39, 13, 0, 16, 1, 15, 45, 212, 105, 6, 0, 107, 240, 227, 190, 0, 0, + 158, 39, 13, 0, 16, 1, 15, 46, 220, 104, 6, 0, 107, 240, 186, 191, 0, + 0, 84, 40, 13, 0, 16, 1, 15, 47, 96, 207, 5, 0, 115, 240, 68, 186, 0, + 0, 236, 3, 13, 0, 16, 1, 15, 48, 68, 38, 7, 0, 96, 240, 144, 185, 0, + 0, 104, 41, 13, 0, 16, 1, 15, 49, 224, 76, 252, 255, 180, 155, 33, 0, + 0, 2, 0, 176, 240, 138, 185, 0, 0, 248, 3, 13, 0, 16, 1, 15, 50, 204, + 247, 1, 0, 176, 240, 29, 190, 0, 0, 10, 4, 13, 0, 16, 1, 15, 51, 212, + 77, 5, 0, 123, 240, 38, 187, 0, 0, 36, 4, 13, 0, 16, 1, 15, 52, 124, + 241, 4, 0, 129, 240, 94, 185, 0, 0, 60, 4, 13, 0, 16, 1, 15, 53, 164, + 1, 5, 0, 128, 240, 82, 185, 0, 0, 76, 4, 13, 0, 16, 1, 15, 54, 200, + 2, 5, 0, 128, 240, 204, 184, 0, 0, 100, 4, 13, 0, 16, 1, 15, 55, 184, + 187, 2, 0, 164, 240, 96, 188, 0, 0, 124, 4, 13, 0, 16, 1, 15, 56, 120, + 58, 0, 0, 1, 32, 32, 185, 0, 0, 0, 0, 0, 0, 16, 1, 15, 57, 32, 19, 0, + 0, 207, 240, 184, 184, 0, 0, 148, 4, 13, 0, 16, 1, 15, 58, 120, 66, + 2, 0, 172, 240, 22, 185, 0, 0, 168, 4, 13, 0, 16, 1, 15, 59, 96, 66, + 2, 0, 172, 240, 56, 185, 0, 0, 212, 4, 13, 0, 16, 1, 15, 60, 120, 140, + 1, 0, 183, 240, 56, 188, 0, 0, 236, 4, 13, 0, 16, 1, 15, 61, 12, 197, + 5, 0, 115, 240, 244, 191, 0, 0, 248, 4, 13, 0, 16, 1, 15, 62, 112, 198, + 5, 0, 115, 240, 90, 191, 0, 0, 40, 5, 13, 0, 16, 1, 15, 63, 76, 252, + 255, 175, 156, 33, 0, 32, 108, 5, 0, 121, 240, 134, 188, 0, 0, 48, 5, + 13, 0, 16, 1, 15, 64, 16, 190, 4, 0, 152, 70, 11, 48, 0, 0, 0, 0, 0, + 0, 16, 1, 15, 65, 176, 100, 6, 0, 109, 240, 3, 185, 0, 0, 186, 54, 13, + 0, 16, 1, 15, 66, 248, 103, 6, 0, 105, 240, 162, 190, 0, 0, 64, 5, 13, + 0, 16, 1, 15, 67, 252, 97, 6, 0, 109, 240, 172, 186, 0, 0, 88, 55, 13, + 0, 16, 1, 15, 68, 20, 172, 3, 0, 149, 240, 156, 188, 0, 0, 80, 5, 13, + 0, 16, 1, 15, 69, 224, 155, 6, 0, 105, 240, 6, 190, 0, 0, 240, 55, 13, + 0, 16, 1, 15, 70, 28, 161, 6, 0, 102, 240, 30, 186, 0, 0, 92, 5, 13, + 0, 16, 1, 15, 71, 144, 51, 4, 0, 141, 240, 236, 184, 0, 0, 108, 5, 13, + 0, 16, 1, 15, 72, 4, 62, 4, 0, 140, 240, 184, 187, 0, 0, 120, 5, 13, + 0, 16, 1, 15, 73, 144, 56, 4, 0, 140, 240, 150, 190, 0, 0, 192, 5, 13, + 0, 16, 1, 15, 74, 196, 101, 2, 0, 170, 240, 6, 184, 0, 0, 212, 5, 13, + 0, 16, 1, 15, 75, 32, 76, 7, 0, 91, 240, 228, 188, 0, 0, 236, 5, 13, + 0, 16, 1, 15, 76, 204, 239, 3, 0, 148, 240, 158, 188, 0, 0, 12, 57, + 13, 0, 16, 1, 15, 76, 252, 255, 170, 157, 33, 0, 77, 140, 248, 3, 0, + 144, 240, 188, 190, 0, 0, 8, 6, 13, 0, 16, 1, 15, 78, 12, 249, 3, 0, + 144, 240, 136, 190, 0, 0, 32, 6, 13, 0, 16, 1, 15, 79, 12, 242, 3, 0, + 145, 240, 24, 186, 0, 0, 64, 6, 13, 0, 16, 1, 15, 80, 32, 245, 6, 0, + 97, 240, 162, 184, 0, 0, 104, 6, 13, 0, 16, 1, 15, 81, 200, 242, 6, + 0, 97, 240, 215, 185, 0, 0, 122, 6, 13, 0, 16, 1, 15, 82, 164, 222, + 4, 0, 130, 240, 242, 187, 0, 0, 140, 6, 13, 0, 16, 1, 15, 83, 44, 66, + 5, 0, 124, 240, 54, 186, 0, 0, 156, 6, 13, 0, 16, 1, 15, 84, 252, 71, + 5, 0, 123, 240, 86, 191, 0, 0, 172, 6, 13, 0, 16, 1, 15, 85, 36, 32, + 3, 0, 161, 240, 20, 189, 0, 0, 80, 58, 13, 0, 16, 1, 15, 86, 108, 32, + 3, 0, 161, 240, 23, 189, 0, 0, 158, 58, 13, 0, 6, 1, 4, 0, 60, 13, 0, + 16, 1, 15, 87, 144, 200, 7, 0, 64, 26, 128, 178, 0, 0, 0, 0, 0, 0, 6, + 1, 4, 44, 60, 13, 0, 6, 1, 4, 150, 61, 13, 0, 16, 1, 15, 88, 68, 31, + 8, 0, 78, 240, 184, 187, 0, 0, 184, 6, 13, 0, 16, 1, 15, 89, 128, 30, + 8, 0, 78, 240, 29, 188, 0, 0, 190, 6, 13, 76, 252, 255, 165, 158, 33, + 0, 0, 16, 1, 15, 90, 232, 30, 8, 0, 78, 240, 236, 187, 0, 0, 196, 6, + 13, 0, 16, 1, 15, 91, 176, 31, 8, 0, 78, 240, 138, 187, 0, 0, 200, 6, + 13, 0, 16, 1, 15, 92, 20, 30, 8, 0, 78, 240, 90, 188, 0, 0, 204, 6, + 13, 0, 16, 1, 15, 93, 248, 221, 6, 0, 98, 240, 108, 188, 0, 0, 212, + 6, 13, 0, 16, 1, 15, 94, 52, 189, 5, 0, 116, 240, 209, 188, 0, 0, 218, + 6, 13, 0, 16, 1, 15, 95, 156, 188, 5, 0, 120, 240, 83, 186, 0, 0, 70, + 65, 13, 0, 16, 1, 15, 96, 236, 187, 5, 0, 120, 240, 229, 186, 0, 0, + 186, 65, 13, 0, 16, 1, 15, 97, 68, 183, 5, 0, 116, 240, 209, 191, 0, + 0, 234, 6, 13, 0, 16, 1, 15, 98, 132, 27, 2, 0, 174, 240, 188, 189, + 0, 0, 0, 7, 13, 0, 16, 1, 15, 99, 76, 64, 3, 0, 160, 240, 56, 188, 0, + 0, 192, 72, 13, 0, 16, 1, 15, 100, 208, 75, 3, 0, 155, 240, 154, 189, + 0, 0, 8, 7, 13, 0, 16, 1, 15, 101, 116, 77, 3, 0, 155, 240, 204, 188, + 0, 0, 16, 7, 13, 0, 16, 1, 15, 102, 28, 71, 3, 0, 155, 240, 254, 191, + 0, 0, 28, 7, 13, 0, 16, 1, 15, 103, 52, 53, 3, 0, 157, 240, 246, 184, + 0, 0, 36, 7, 76, 252, 255, 160, 159, 33, 0, 13, 0, 16, 1, 15, 104, 156, + 55, 3, 0, 156, 240, 208, 191, 0, 0, 64, 7, 13, 0, 16, 1, 15, 105, 236, + 23, 2, 0, 179, 240, 76, 187, 0, 0, 136, 78, 13, 0, 16, 1, 15, 106, 56, + 199, 1, 0, 180, 240, 10, 184, 0, 0, 80, 7, 13, 0, 16, 1, 15, 107, 16, + 68, 0, 0, 208, 240, 88, 190, 0, 0, 196, 80, 13, 0, 16, 1, 15, 108, 4, + 199, 1, 0, 180, 240, 39, 184, 0, 0, 86, 7, 13, 0, 16, 1, 15, 109, 132, + 211, 2, 0, 168, 240, 199, 184, 0, 0, 22, 85, 13, 0, 6, 1, 4, 114, 88, + 13, 0, 6, 1, 4, 132, 91, 13, 0, 16, 1, 15, 110, 240, 175, 1, 0, 186, + 240, 238, 189, 0, 0, 208, 91, 13, 0, 16, 1, 15, 111, 12, 7, 2, 0, 176, + 240, 42, 184, 0, 0, 100, 7, 13, 0, 16, 1, 15, 112, 100, 57, 8, 0, 82, + 240, 114, 185, 0, 0, 76, 92, 13, 0, 16, 1, 15, 113, 100, 86, 4, 0, 139, + 240, 134, 184, 0, 0, 116, 7, 13, 0, 16, 1, 15, 114, 60, 86, 4, 0, 144, + 240, 95, 187, 0, 0, 254, 92, 13, 0, 16, 1, 15, 115, 176, 87, 4, 0, 138, + 240, 227, 191, 0, 0, 122, 7, 13, 0, 16, 1, 15, 116, 204, 45, 5, 0, 125, + 240, 216, 188, 0, 0, 128, 7, 13, 0, 16, 76, 252, 204, 155, 160, 33, + 0, 1, 15, 117, 128, 42, 3, 0, 157, 240, 132, 190, 0, 0, 140, 7, 13, + 0, 16, 1, 15, 118, 84, 164, 6, 0, 102, 240, 174, 185, 0, 0, 180, 7, + 13, 0, 16, 1, 15, 119, 20, 105, 5, 0, 121, 240, 82, 191, 0, 0, 188, + 7, 13, 0, 16, 1, 15, 120, 232, 112, 7, 0, 89, 240, 108, 187, 0, 0, 196, + 7, 13, 0, 16, 1, 15, 121, 132, 103, 7, 0, 90, 240, 38, 184, 0, 0, 212, + 7, 13, 0, 16, 1, 15, 122, 84, 47, 0, 0, 205, 240, 70, 188, 0, 0, 228, + 7, 13, 0, 16, 1, 15, 123, 224, 49, 0, 0, 205, 240, 4, 187, 0, 0, 236, + 7, 13, 0, 16, 1, 15, 124, 252, 181, 1, 0, 181, 240, 2, 185, 0, 0, 4, + 8, 13, 0, 16, 1, 15, 125, 252, 199, 1, 0, 180, 240, 8, 184, 0, 0, 16, + 8, 13, 0, 16, 1, 15, 126, 100, 200, 1, 0, 179, 240, 217, 191, 0, 0, + 26, 8, 13, 0, 16, 1, 15, 127, 80, 180, 1, 0, 181, 240, 234, 185, 0, + 0, 40, 8, 13, 0, 254, 0, 0, 78, 252, 4, 255, 255, 255, 255 +}; + +const int brcm_patch_ram_length = sizeof(brcm_patchram_buf); diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg.c b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg.c new file mode 100644 index 00000000000..ed8102601fd --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg.c @@ -0,0 +1,36 @@ +/******************************************************************************* +* File Name: cycfg.c +* +* Description: +* Wrapper function to initialize all generated code. +* This file was automatically generated and should not be modified. +* cfg-backend-cli: 1.2.0.1478 +* Device Support Library (../../../../output/psoc6/psoc6pdl): 1.4.0.1571 +* +******************************************************************************** +* Copyright 2017-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +********************************************************************************/ + +#include "cycfg.h" + +void init_cycfg_all(void) +{ + init_cycfg_system(); + init_cycfg_clocks(); + init_cycfg_routing(); + init_cycfg_peripherals(); + init_cycfg_pins(); +} diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg.h b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg.h new file mode 100644 index 00000000000..55f9bd74fa4 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg.h @@ -0,0 +1,49 @@ +/******************************************************************************* +* File Name: cycfg.h +* +* Description: +* Simple wrapper header containing all generated files. +* This file was automatically generated and should not be modified. +* cfg-backend-cli: 1.2.0.1478 +* Device Support Library (../../../../output/psoc6/psoc6pdl): 1.4.0.1571 +* +******************************************************************************** +* Copyright 2017-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +********************************************************************************/ + +#if !defined(CYCFG_H) +#define CYCFG_H + +#if defined(__cplusplus) +extern "C" { +#endif + +#include "cycfg_notices.h" +#include "cycfg_system.h" +#include "cycfg_clocks.h" +#include "cycfg_routing.h" +#include "cycfg_peripherals.h" +#include "cycfg_pins.h" + +void init_cycfg_all(void); + + +#if defined(__cplusplus) +} +#endif + + +#endif /* CYCFG_H */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg.timestamp b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg.timestamp new file mode 100755 index 00000000000..46ae60d2123 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg.timestamp @@ -0,0 +1,26 @@ +/******************************************************************************* +* File Name: cycfg.timestamp +* +* Description: +* Sentinel file for determining if generated source is up to date. +* This file was automatically generated and should not be modified. +* cfg-backend-cli: 1.2.0.1478 +* Device Support Library (../../../../output/psoc6/psoc6pdl): 1.4.0.1571 +* +******************************************************************************** +* Copyright 2017-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +********************************************************************************/ + diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_clocks.c b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_clocks.c new file mode 100644 index 00000000000..45223d1950e --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_clocks.c @@ -0,0 +1,47 @@ +/******************************************************************************* +* File Name: cycfg_clocks.c +* +* Description: +* Clock configuration +* This file was automatically generated and should not be modified. +* cfg-backend-cli: 1.2.0.1478 +* Device Support Library (../../../../output/psoc6/psoc6pdl): 1.4.0.1571 +* +******************************************************************************** +* Copyright 2017-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +********************************************************************************/ + +#include "cycfg_clocks.h" + +#if defined (CY_USING_HAL) + const cyhal_resource_inst_t CYBSP_CSD_CLK_DIV_obj = + { + .type = CYHAL_RSC_CLOCK, + .block_num = CYBSP_CSD_CLK_DIV_HW, + .channel_num = CYBSP_CSD_CLK_DIV_NUM, + }; +#endif //defined (CY_USING_HAL) + + +void init_cycfg_clocks(void) +{ + Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_8_BIT, 3U); + Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_8_BIT, 3U, 255U); + Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_8_BIT, 3U); +#if defined (CY_USING_HAL) + cyhal_hwmgr_reserve(&CYBSP_CSD_CLK_DIV_obj); +#endif //defined (CY_USING_HAL) +} diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_clocks.h b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_clocks.h new file mode 100644 index 00000000000..9512e172646 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_clocks.h @@ -0,0 +1,55 @@ +/******************************************************************************* +* File Name: cycfg_clocks.h +* +* Description: +* Clock configuration +* This file was automatically generated and should not be modified. +* cfg-backend-cli: 1.2.0.1478 +* Device Support Library (../../../../output/psoc6/psoc6pdl): 1.4.0.1571 +* +******************************************************************************** +* Copyright 2017-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +********************************************************************************/ + +#if !defined(CYCFG_CLOCKS_H) +#define CYCFG_CLOCKS_H + +#include "cycfg_notices.h" +#include "cy_sysclk.h" +#if defined (CY_USING_HAL) + #include "cyhal_hwmgr.h" +#endif //defined (CY_USING_HAL) + +#if defined(__cplusplus) +extern "C" { +#endif + +#define CYBSP_CSD_CLK_DIV_ENABLED 1U +#define CYBSP_CSD_CLK_DIV_HW CY_SYSCLK_DIV_8_BIT +#define CYBSP_CSD_CLK_DIV_NUM 3U + +#if defined (CY_USING_HAL) + extern const cyhal_resource_inst_t CYBSP_CSD_CLK_DIV_obj; +#endif //defined (CY_USING_HAL) + +void init_cycfg_clocks(void); + +#if defined(__cplusplus) +} +#endif + + +#endif /* CYCFG_CLOCKS_H */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_notices.h b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_notices.h new file mode 100644 index 00000000000..682af2fcd35 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_notices.h @@ -0,0 +1,32 @@ +/******************************************************************************* +* File Name: cycfg_notices.h +* +* Description: +* Contains warnings and errors that occurred while generating code for the +* design. +* This file was automatically generated and should not be modified. +* cfg-backend-cli: 1.2.0.1478 +* Device Support Library (../../../../output/psoc6/psoc6pdl): 1.4.0.1571 +* +******************************************************************************** +* Copyright 2017-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +********************************************************************************/ + +#if !defined(CYCFG_NOTICES_H) +#define CYCFG_NOTICES_H + + +#endif /* CYCFG_NOTICES_H */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_peripherals.c b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_peripherals.c new file mode 100644 index 00000000000..181ef57d60b --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_peripherals.c @@ -0,0 +1,38 @@ +/******************************************************************************* +* File Name: cycfg_peripherals.c +* +* Description: +* Peripheral Hardware Block configuration +* This file was automatically generated and should not be modified. +* cfg-backend-cli: 1.2.0.1478 +* Device Support Library (../../../../output/psoc6/psoc6pdl): 1.4.0.1571 +* +******************************************************************************** +* Copyright 2017-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +********************************************************************************/ + +#include "cycfg_peripherals.h" + +cy_stc_csd_context_t cy_csd_0_context = +{ + .lockKey = CY_CSD_NONE_KEY, +}; + + +void init_cycfg_peripherals(void) +{ + Cy_SysClk_PeriphAssignDivider(PCLK_CSD_CLOCK, CY_SYSCLK_DIV_8_BIT, 3U); +} diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_peripherals.h b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_peripherals.h new file mode 100644 index 00000000000..ae1ee444a68 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_peripherals.h @@ -0,0 +1,84 @@ +/******************************************************************************* +* File Name: cycfg_peripherals.h +* +* Description: +* Peripheral Hardware Block configuration +* This file was automatically generated and should not be modified. +* cfg-backend-cli: 1.2.0.1478 +* Device Support Library (../../../../output/psoc6/psoc6pdl): 1.4.0.1571 +* +******************************************************************************** +* Copyright 2017-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +********************************************************************************/ + +#if !defined(CYCFG_PERIPHERALS_H) +#define CYCFG_PERIPHERALS_H + +#include "cycfg_notices.h" +#include "cy_sysclk.h" +#include "cy_csd.h" + +#if defined(__cplusplus) +extern "C" { +#endif + +#define CYBSP_CSD_ENABLED 1U +#define CY_CAPSENSE_CORE 4u +#define CY_CAPSENSE_CPU_CLK 100000000u +#define CY_CAPSENSE_PERI_CLK 100000000u +#define CY_CAPSENSE_VDDA_MV 3300u +#define CY_CAPSENSE_PERI_DIV_TYPE CY_SYSCLK_DIV_8_BIT +#define CY_CAPSENSE_PERI_DIV_INDEX 3u +#define Cmod_PORT GPIO_PRT7 +#define CintA_PORT GPIO_PRT7 +#define CintB_PORT GPIO_PRT7 +#define Button0_Rx0_PORT GPIO_PRT1 +#define Button0_Tx_PORT GPIO_PRT8 +#define Button1_Rx0_PORT GPIO_PRT1 +#define Button1_Tx_PORT GPIO_PRT8 +#define LinearSlider0_Sns0_PORT GPIO_PRT8 +#define LinearSlider0_Sns1_PORT GPIO_PRT8 +#define LinearSlider0_Sns2_PORT GPIO_PRT8 +#define LinearSlider0_Sns3_PORT GPIO_PRT8 +#define LinearSlider0_Sns4_PORT GPIO_PRT8 +#define Cmod_PIN 7u +#define CintA_PIN 1u +#define CintB_PIN 2u +#define Button0_Rx0_PIN 0u +#define Button0_Tx_PIN 1u +#define Button1_Rx0_PIN 0u +#define Button1_Tx_PIN 2u +#define LinearSlider0_Sns0_PIN 3u +#define LinearSlider0_Sns1_PIN 4u +#define LinearSlider0_Sns2_PIN 5u +#define LinearSlider0_Sns3_PIN 6u +#define LinearSlider0_Sns4_PIN 7u +#define Cmod_PORT_NUM 7u +#define CintA_PORT_NUM 7u +#define CintB_PORT_NUM 7u +#define CYBSP_CSD_HW CSD0 +#define CYBSP_CSD_IRQ csd_interrupt_IRQn + +extern cy_stc_csd_context_t cy_csd_0_context; + +void init_cycfg_peripherals(void); + +#if defined(__cplusplus) +} +#endif + + +#endif /* CYCFG_PERIPHERALS_H */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_pins.c b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_pins.c new file mode 100644 index 00000000000..5ea5df83bdf --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_pins.c @@ -0,0 +1,485 @@ +/******************************************************************************* +* File Name: cycfg_pins.c +* +* Description: +* Pin configuration +* This file was automatically generated and should not be modified. +* cfg-backend-cli: 1.2.0.1478 +* Device Support Library (../../../../output/psoc6/psoc6pdl): 1.4.0.1571 +* +******************************************************************************** +* Copyright 2017-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +********************************************************************************/ + +#include "cycfg_pins.h" + +const cy_stc_gpio_pin_config_t CYBSP_WCO_IN_config = +{ + .outVal = 1, + .driveMode = CY_GPIO_DM_ANALOG, + .hsiom = CYBSP_WCO_IN_HSIOM, + .intEdge = CY_GPIO_INTR_DISABLE, + .intMask = 0UL, + .vtrip = CY_GPIO_VTRIP_CMOS, + .slewRate = CY_GPIO_SLEW_FAST, + .driveSel = CY_GPIO_DRIVE_1_2, + .vregEn = 0UL, + .ibufMode = 0UL, + .vtripSel = 0UL, + .vrefSel = 0UL, + .vohSel = 0UL, +}; +#if defined (CY_USING_HAL) + const cyhal_resource_inst_t CYBSP_WCO_IN_obj = + { + .type = CYHAL_RSC_GPIO, + .block_num = CYBSP_WCO_IN_PORT_NUM, + .channel_num = CYBSP_WCO_IN_PIN, + }; +#endif //defined (CY_USING_HAL) +const cy_stc_gpio_pin_config_t CYBSP_WCO_OUT_config = +{ + .outVal = 1, + .driveMode = CY_GPIO_DM_ANALOG, + .hsiom = CYBSP_WCO_OUT_HSIOM, + .intEdge = CY_GPIO_INTR_DISABLE, + .intMask = 0UL, + .vtrip = CY_GPIO_VTRIP_CMOS, + .slewRate = CY_GPIO_SLEW_FAST, + .driveSel = CY_GPIO_DRIVE_1_2, + .vregEn = 0UL, + .ibufMode = 0UL, + .vtripSel = 0UL, + .vrefSel = 0UL, + .vohSel = 0UL, +}; +#if defined (CY_USING_HAL) + const cyhal_resource_inst_t CYBSP_WCO_OUT_obj = + { + .type = CYHAL_RSC_GPIO, + .block_num = CYBSP_WCO_OUT_PORT_NUM, + .channel_num = CYBSP_WCO_OUT_PIN, + }; +#endif //defined (CY_USING_HAL) +const cy_stc_gpio_pin_config_t CYBSP_CSD_RX_config = +{ + .outVal = 1, + .driveMode = CY_GPIO_DM_ANALOG, + .hsiom = CYBSP_CSD_RX_HSIOM, + .intEdge = CY_GPIO_INTR_DISABLE, + .intMask = 0UL, + .vtrip = CY_GPIO_VTRIP_CMOS, + .slewRate = CY_GPIO_SLEW_FAST, + .driveSel = CY_GPIO_DRIVE_1_2, + .vregEn = 0UL, + .ibufMode = 0UL, + .vtripSel = 0UL, + .vrefSel = 0UL, + .vohSel = 0UL, +}; +#if defined (CY_USING_HAL) + const cyhal_resource_inst_t CYBSP_CSD_RX_obj = + { + .type = CYHAL_RSC_GPIO, + .block_num = CYBSP_CSD_RX_PORT_NUM, + .channel_num = CYBSP_CSD_RX_PIN, + }; +#endif //defined (CY_USING_HAL) +const cy_stc_gpio_pin_config_t CYBSP_SWO_config = +{ + .outVal = 1, + .driveMode = CY_GPIO_DM_STRONG_IN_OFF, + .hsiom = CYBSP_SWO_HSIOM, + .intEdge = CY_GPIO_INTR_DISABLE, + .intMask = 0UL, + .vtrip = CY_GPIO_VTRIP_CMOS, + .slewRate = CY_GPIO_SLEW_FAST, + .driveSel = CY_GPIO_DRIVE_1_2, + .vregEn = 0UL, + .ibufMode = 0UL, + .vtripSel = 0UL, + .vrefSel = 0UL, + .vohSel = 0UL, +}; +#if defined (CY_USING_HAL) + const cyhal_resource_inst_t CYBSP_SWO_obj = + { + .type = CYHAL_RSC_GPIO, + .block_num = CYBSP_SWO_PORT_NUM, + .channel_num = CYBSP_SWO_PIN, + }; +#endif //defined (CY_USING_HAL) +const cy_stc_gpio_pin_config_t CYBSP_SWDIO_config = +{ + .outVal = 1, + .driveMode = CY_GPIO_DM_PULLUP, + .hsiom = CYBSP_SWDIO_HSIOM, + .intEdge = CY_GPIO_INTR_DISABLE, + .intMask = 0UL, + .vtrip = CY_GPIO_VTRIP_CMOS, + .slewRate = CY_GPIO_SLEW_FAST, + .driveSel = CY_GPIO_DRIVE_1_2, + .vregEn = 0UL, + .ibufMode = 0UL, + .vtripSel = 0UL, + .vrefSel = 0UL, + .vohSel = 0UL, +}; +#if defined (CY_USING_HAL) + const cyhal_resource_inst_t CYBSP_SWDIO_obj = + { + .type = CYHAL_RSC_GPIO, + .block_num = CYBSP_SWDIO_PORT_NUM, + .channel_num = CYBSP_SWDIO_PIN, + }; +#endif //defined (CY_USING_HAL) +const cy_stc_gpio_pin_config_t CYBSP_SWDCK_config = +{ + .outVal = 1, + .driveMode = CY_GPIO_DM_PULLDOWN, + .hsiom = CYBSP_SWDCK_HSIOM, + .intEdge = CY_GPIO_INTR_DISABLE, + .intMask = 0UL, + .vtrip = CY_GPIO_VTRIP_CMOS, + .slewRate = CY_GPIO_SLEW_FAST, + .driveSel = CY_GPIO_DRIVE_1_2, + .vregEn = 0UL, + .ibufMode = 0UL, + .vtripSel = 0UL, + .vrefSel = 0UL, + .vohSel = 0UL, +}; +#if defined (CY_USING_HAL) + const cyhal_resource_inst_t CYBSP_SWDCK_obj = + { + .type = CYHAL_RSC_GPIO, + .block_num = CYBSP_SWDCK_PORT_NUM, + .channel_num = CYBSP_SWDCK_PIN, + }; +#endif //defined (CY_USING_HAL) +const cy_stc_gpio_pin_config_t CYBSP_CINA_config = +{ + .outVal = 1, + .driveMode = CY_GPIO_DM_ANALOG, + .hsiom = CYBSP_CINA_HSIOM, + .intEdge = CY_GPIO_INTR_DISABLE, + .intMask = 0UL, + .vtrip = CY_GPIO_VTRIP_CMOS, + .slewRate = CY_GPIO_SLEW_FAST, + .driveSel = CY_GPIO_DRIVE_1_2, + .vregEn = 0UL, + .ibufMode = 0UL, + .vtripSel = 0UL, + .vrefSel = 0UL, + .vohSel = 0UL, +}; +#if defined (CY_USING_HAL) + const cyhal_resource_inst_t CYBSP_CINA_obj = + { + .type = CYHAL_RSC_GPIO, + .block_num = CYBSP_CINA_PORT_NUM, + .channel_num = CYBSP_CINA_PIN, + }; +#endif //defined (CY_USING_HAL) +const cy_stc_gpio_pin_config_t CYBSP_CINB_config = +{ + .outVal = 1, + .driveMode = CY_GPIO_DM_ANALOG, + .hsiom = CYBSP_CINB_HSIOM, + .intEdge = CY_GPIO_INTR_DISABLE, + .intMask = 0UL, + .vtrip = CY_GPIO_VTRIP_CMOS, + .slewRate = CY_GPIO_SLEW_FAST, + .driveSel = CY_GPIO_DRIVE_1_2, + .vregEn = 0UL, + .ibufMode = 0UL, + .vtripSel = 0UL, + .vrefSel = 0UL, + .vohSel = 0UL, +}; +#if defined (CY_USING_HAL) + const cyhal_resource_inst_t CYBSP_CINB_obj = + { + .type = CYHAL_RSC_GPIO, + .block_num = CYBSP_CINB_PORT_NUM, + .channel_num = CYBSP_CINB_PIN, + }; +#endif //defined (CY_USING_HAL) +const cy_stc_gpio_pin_config_t CYBSP_CMOD_config = +{ + .outVal = 1, + .driveMode = CY_GPIO_DM_ANALOG, + .hsiom = CYBSP_CMOD_HSIOM, + .intEdge = CY_GPIO_INTR_DISABLE, + .intMask = 0UL, + .vtrip = CY_GPIO_VTRIP_CMOS, + .slewRate = CY_GPIO_SLEW_FAST, + .driveSel = CY_GPIO_DRIVE_1_2, + .vregEn = 0UL, + .ibufMode = 0UL, + .vtripSel = 0UL, + .vrefSel = 0UL, + .vohSel = 0UL, +}; +#if defined (CY_USING_HAL) + const cyhal_resource_inst_t CYBSP_CMOD_obj = + { + .type = CYHAL_RSC_GPIO, + .block_num = CYBSP_CMOD_PORT_NUM, + .channel_num = CYBSP_CMOD_PIN, + }; +#endif //defined (CY_USING_HAL) +const cy_stc_gpio_pin_config_t CYBSP_CSD_BTN0_config = +{ + .outVal = 1, + .driveMode = CY_GPIO_DM_ANALOG, + .hsiom = CYBSP_CSD_BTN0_HSIOM, + .intEdge = CY_GPIO_INTR_DISABLE, + .intMask = 0UL, + .vtrip = CY_GPIO_VTRIP_CMOS, + .slewRate = CY_GPIO_SLEW_FAST, + .driveSel = CY_GPIO_DRIVE_1_2, + .vregEn = 0UL, + .ibufMode = 0UL, + .vtripSel = 0UL, + .vrefSel = 0UL, + .vohSel = 0UL, +}; +#if defined (CY_USING_HAL) + const cyhal_resource_inst_t CYBSP_CSD_BTN0_obj = + { + .type = CYHAL_RSC_GPIO, + .block_num = CYBSP_CSD_BTN0_PORT_NUM, + .channel_num = CYBSP_CSD_BTN0_PIN, + }; +#endif //defined (CY_USING_HAL) +const cy_stc_gpio_pin_config_t CYBSP_CSD_BTN1_config = +{ + .outVal = 1, + .driveMode = CY_GPIO_DM_ANALOG, + .hsiom = CYBSP_CSD_BTN1_HSIOM, + .intEdge = CY_GPIO_INTR_DISABLE, + .intMask = 0UL, + .vtrip = CY_GPIO_VTRIP_CMOS, + .slewRate = CY_GPIO_SLEW_FAST, + .driveSel = CY_GPIO_DRIVE_1_2, + .vregEn = 0UL, + .ibufMode = 0UL, + .vtripSel = 0UL, + .vrefSel = 0UL, + .vohSel = 0UL, +}; +#if defined (CY_USING_HAL) + const cyhal_resource_inst_t CYBSP_CSD_BTN1_obj = + { + .type = CYHAL_RSC_GPIO, + .block_num = CYBSP_CSD_BTN1_PORT_NUM, + .channel_num = CYBSP_CSD_BTN1_PIN, + }; +#endif //defined (CY_USING_HAL) +const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD0_config = +{ + .outVal = 1, + .driveMode = CY_GPIO_DM_ANALOG, + .hsiom = CYBSP_CSD_SLD0_HSIOM, + .intEdge = CY_GPIO_INTR_DISABLE, + .intMask = 0UL, + .vtrip = CY_GPIO_VTRIP_CMOS, + .slewRate = CY_GPIO_SLEW_FAST, + .driveSel = CY_GPIO_DRIVE_1_2, + .vregEn = 0UL, + .ibufMode = 0UL, + .vtripSel = 0UL, + .vrefSel = 0UL, + .vohSel = 0UL, +}; +#if defined (CY_USING_HAL) + const cyhal_resource_inst_t CYBSP_CSD_SLD0_obj = + { + .type = CYHAL_RSC_GPIO, + .block_num = CYBSP_CSD_SLD0_PORT_NUM, + .channel_num = CYBSP_CSD_SLD0_PIN, + }; +#endif //defined (CY_USING_HAL) +const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD1_config = +{ + .outVal = 1, + .driveMode = CY_GPIO_DM_ANALOG, + .hsiom = CYBSP_CSD_SLD1_HSIOM, + .intEdge = CY_GPIO_INTR_DISABLE, + .intMask = 0UL, + .vtrip = CY_GPIO_VTRIP_CMOS, + .slewRate = CY_GPIO_SLEW_FAST, + .driveSel = CY_GPIO_DRIVE_1_2, + .vregEn = 0UL, + .ibufMode = 0UL, + .vtripSel = 0UL, + .vrefSel = 0UL, + .vohSel = 0UL, +}; +#if defined (CY_USING_HAL) + const cyhal_resource_inst_t CYBSP_CSD_SLD1_obj = + { + .type = CYHAL_RSC_GPIO, + .block_num = CYBSP_CSD_SLD1_PORT_NUM, + .channel_num = CYBSP_CSD_SLD1_PIN, + }; +#endif //defined (CY_USING_HAL) +const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD2_config = +{ + .outVal = 1, + .driveMode = CY_GPIO_DM_ANALOG, + .hsiom = CYBSP_CSD_SLD2_HSIOM, + .intEdge = CY_GPIO_INTR_DISABLE, + .intMask = 0UL, + .vtrip = CY_GPIO_VTRIP_CMOS, + .slewRate = CY_GPIO_SLEW_FAST, + .driveSel = CY_GPIO_DRIVE_1_2, + .vregEn = 0UL, + .ibufMode = 0UL, + .vtripSel = 0UL, + .vrefSel = 0UL, + .vohSel = 0UL, +}; +#if defined (CY_USING_HAL) + const cyhal_resource_inst_t CYBSP_CSD_SLD2_obj = + { + .type = CYHAL_RSC_GPIO, + .block_num = CYBSP_CSD_SLD2_PORT_NUM, + .channel_num = CYBSP_CSD_SLD2_PIN, + }; +#endif //defined (CY_USING_HAL) +const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD3_config = +{ + .outVal = 1, + .driveMode = CY_GPIO_DM_ANALOG, + .hsiom = CYBSP_CSD_SLD3_HSIOM, + .intEdge = CY_GPIO_INTR_DISABLE, + .intMask = 0UL, + .vtrip = CY_GPIO_VTRIP_CMOS, + .slewRate = CY_GPIO_SLEW_FAST, + .driveSel = CY_GPIO_DRIVE_1_2, + .vregEn = 0UL, + .ibufMode = 0UL, + .vtripSel = 0UL, + .vrefSel = 0UL, + .vohSel = 0UL, +}; +#if defined (CY_USING_HAL) + const cyhal_resource_inst_t CYBSP_CSD_SLD3_obj = + { + .type = CYHAL_RSC_GPIO, + .block_num = CYBSP_CSD_SLD3_PORT_NUM, + .channel_num = CYBSP_CSD_SLD3_PIN, + }; +#endif //defined (CY_USING_HAL) +const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD4_config = +{ + .outVal = 1, + .driveMode = CY_GPIO_DM_ANALOG, + .hsiom = CYBSP_CSD_SLD4_HSIOM, + .intEdge = CY_GPIO_INTR_DISABLE, + .intMask = 0UL, + .vtrip = CY_GPIO_VTRIP_CMOS, + .slewRate = CY_GPIO_SLEW_FAST, + .driveSel = CY_GPIO_DRIVE_1_2, + .vregEn = 0UL, + .ibufMode = 0UL, + .vtripSel = 0UL, + .vrefSel = 0UL, + .vohSel = 0UL, +}; +#if defined (CY_USING_HAL) + const cyhal_resource_inst_t CYBSP_CSD_SLD4_obj = + { + .type = CYHAL_RSC_GPIO, + .block_num = CYBSP_CSD_SLD4_PORT_NUM, + .channel_num = CYBSP_CSD_SLD4_PIN, + }; +#endif //defined (CY_USING_HAL) + + +void init_cycfg_pins(void) +{ + Cy_GPIO_Pin_Init(CYBSP_WCO_IN_PORT, CYBSP_WCO_IN_PIN, &CYBSP_WCO_IN_config); +#if defined (CY_USING_HAL) + cyhal_hwmgr_reserve(&CYBSP_WCO_IN_obj); +#endif //defined (CY_USING_HAL) + + Cy_GPIO_Pin_Init(CYBSP_WCO_OUT_PORT, CYBSP_WCO_OUT_PIN, &CYBSP_WCO_OUT_config); +#if defined (CY_USING_HAL) + cyhal_hwmgr_reserve(&CYBSP_WCO_OUT_obj); +#endif //defined (CY_USING_HAL) + +#if defined (CY_USING_HAL) + cyhal_hwmgr_reserve(&CYBSP_CSD_RX_obj); +#endif //defined (CY_USING_HAL) + + Cy_GPIO_Pin_Init(CYBSP_SWO_PORT, CYBSP_SWO_PIN, &CYBSP_SWO_config); +#if defined (CY_USING_HAL) + cyhal_hwmgr_reserve(&CYBSP_SWO_obj); +#endif //defined (CY_USING_HAL) + + Cy_GPIO_Pin_Init(CYBSP_SWDIO_PORT, CYBSP_SWDIO_PIN, &CYBSP_SWDIO_config); +#if defined (CY_USING_HAL) + cyhal_hwmgr_reserve(&CYBSP_SWDIO_obj); +#endif //defined (CY_USING_HAL) + + Cy_GPIO_Pin_Init(CYBSP_SWDCK_PORT, CYBSP_SWDCK_PIN, &CYBSP_SWDCK_config); +#if defined (CY_USING_HAL) + cyhal_hwmgr_reserve(&CYBSP_SWDCK_obj); +#endif //defined (CY_USING_HAL) + +#if defined (CY_USING_HAL) + cyhal_hwmgr_reserve(&CYBSP_CINA_obj); +#endif //defined (CY_USING_HAL) + +#if defined (CY_USING_HAL) + cyhal_hwmgr_reserve(&CYBSP_CINB_obj); +#endif //defined (CY_USING_HAL) + +#if defined (CY_USING_HAL) + cyhal_hwmgr_reserve(&CYBSP_CMOD_obj); +#endif //defined (CY_USING_HAL) + +#if defined (CY_USING_HAL) + cyhal_hwmgr_reserve(&CYBSP_CSD_BTN0_obj); +#endif //defined (CY_USING_HAL) + +#if defined (CY_USING_HAL) + cyhal_hwmgr_reserve(&CYBSP_CSD_BTN1_obj); +#endif //defined (CY_USING_HAL) + +#if defined (CY_USING_HAL) + cyhal_hwmgr_reserve(&CYBSP_CSD_SLD0_obj); +#endif //defined (CY_USING_HAL) + +#if defined (CY_USING_HAL) + cyhal_hwmgr_reserve(&CYBSP_CSD_SLD1_obj); +#endif //defined (CY_USING_HAL) + +#if defined (CY_USING_HAL) + cyhal_hwmgr_reserve(&CYBSP_CSD_SLD2_obj); +#endif //defined (CY_USING_HAL) + +#if defined (CY_USING_HAL) + cyhal_hwmgr_reserve(&CYBSP_CSD_SLD3_obj); +#endif //defined (CY_USING_HAL) + +#if defined (CY_USING_HAL) + cyhal_hwmgr_reserve(&CYBSP_CSD_SLD4_obj); +#endif //defined (CY_USING_HAL) +} diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_pins.h b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_pins.h new file mode 100644 index 00000000000..ace7a770b0e --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_pins.h @@ -0,0 +1,498 @@ +/******************************************************************************* +* File Name: cycfg_pins.h +* +* Description: +* Pin configuration +* This file was automatically generated and should not be modified. +* cfg-backend-cli: 1.2.0.1478 +* Device Support Library (../../../../output/psoc6/psoc6pdl): 1.4.0.1571 +* +******************************************************************************** +* Copyright 2017-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +********************************************************************************/ + +#if !defined(CYCFG_PINS_H) +#define CYCFG_PINS_H + +#include "cycfg_notices.h" +#include "cy_gpio.h" +#if defined (CY_USING_HAL) + #include "cyhal_hwmgr.h" +#endif //defined (CY_USING_HAL) +#include "cycfg_routing.h" + +#if defined(__cplusplus) +extern "C" { +#endif + +#define CYBSP_WCO_IN_ENABLED 1U +#define CYBSP_WCO_IN_PORT GPIO_PRT0 +#define CYBSP_WCO_IN_PORT_NUM 0U +#define CYBSP_WCO_IN_PIN 0U +#define CYBSP_WCO_IN_NUM 0U +#define CYBSP_WCO_IN_DRIVEMODE CY_GPIO_DM_ANALOG +#define CYBSP_WCO_IN_INIT_DRIVESTATE 1 +#ifndef ioss_0_port_0_pin_0_HSIOM + #define ioss_0_port_0_pin_0_HSIOM HSIOM_SEL_GPIO +#endif +#define CYBSP_WCO_IN_HSIOM ioss_0_port_0_pin_0_HSIOM +#define CYBSP_WCO_IN_IRQ ioss_interrupts_gpio_0_IRQn +#if defined (CY_USING_HAL) + #define CYBSP_WCO_IN_HAL_PORT_PIN P0_0 +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_WCO_IN_HAL_IRQ CYHAL_GPIO_IRQ_NONE +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_WCO_IN_HAL_DIR CYHAL_GPIO_DIR_INPUT +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_WCO_IN_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_ANALOG +#endif //defined (CY_USING_HAL) +#define CYBSP_WCO_OUT_ENABLED 1U +#define CYBSP_WCO_OUT_PORT GPIO_PRT0 +#define CYBSP_WCO_OUT_PORT_NUM 0U +#define CYBSP_WCO_OUT_PIN 1U +#define CYBSP_WCO_OUT_NUM 1U +#define CYBSP_WCO_OUT_DRIVEMODE CY_GPIO_DM_ANALOG +#define CYBSP_WCO_OUT_INIT_DRIVESTATE 1 +#ifndef ioss_0_port_0_pin_1_HSIOM + #define ioss_0_port_0_pin_1_HSIOM HSIOM_SEL_GPIO +#endif +#define CYBSP_WCO_OUT_HSIOM ioss_0_port_0_pin_1_HSIOM +#define CYBSP_WCO_OUT_IRQ ioss_interrupts_gpio_0_IRQn +#if defined (CY_USING_HAL) + #define CYBSP_WCO_OUT_HAL_PORT_PIN P0_1 +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_WCO_OUT_HAL_IRQ CYHAL_GPIO_IRQ_NONE +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_WCO_OUT_HAL_DIR CYHAL_GPIO_DIR_INPUT +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_WCO_OUT_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_ANALOG +#endif //defined (CY_USING_HAL) +#define CYBSP_CSD_RX_ENABLED 1U +#define CYBSP_CSD_RX_PORT GPIO_PRT1 +#define CYBSP_CSD_RX_PORT_NUM 1U +#define CYBSP_CSD_RX_PIN 0U +#define CYBSP_CSD_RX_NUM 0U +#define CYBSP_CSD_RX_DRIVEMODE CY_GPIO_DM_ANALOG +#define CYBSP_CSD_RX_INIT_DRIVESTATE 1 +#ifndef ioss_0_port_1_pin_0_HSIOM + #define ioss_0_port_1_pin_0_HSIOM HSIOM_SEL_GPIO +#endif +#define CYBSP_CSD_RX_HSIOM ioss_0_port_1_pin_0_HSIOM +#define CYBSP_CSD_RX_IRQ ioss_interrupts_gpio_1_IRQn +#if defined (CY_USING_HAL) + #define CYBSP_CSD_RX_HAL_PORT_PIN P1_0 +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_RX_HAL_IRQ CYHAL_GPIO_IRQ_NONE +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_RX_HAL_DIR CYHAL_GPIO_DIR_INPUT +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_RX_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_ANALOG +#endif //defined (CY_USING_HAL) +#define CYBSP_SWO_ENABLED 1U +#define CYBSP_SWO_PORT GPIO_PRT6 +#define CYBSP_SWO_PORT_NUM 6U +#define CYBSP_SWO_PIN 4U +#define CYBSP_SWO_NUM 4U +#define CYBSP_SWO_DRIVEMODE CY_GPIO_DM_STRONG_IN_OFF +#define CYBSP_SWO_INIT_DRIVESTATE 1 +#ifndef ioss_0_port_6_pin_4_HSIOM + #define ioss_0_port_6_pin_4_HSIOM HSIOM_SEL_GPIO +#endif +#define CYBSP_SWO_HSIOM ioss_0_port_6_pin_4_HSIOM +#define CYBSP_SWO_IRQ ioss_interrupts_gpio_6_IRQn +#if defined (CY_USING_HAL) + #define CYBSP_SWO_HAL_PORT_PIN P6_4 +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_SWO_HAL_IRQ CYHAL_GPIO_IRQ_NONE +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_SWO_HAL_DIR CYHAL_GPIO_DIR_OUTPUT +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_SWO_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_STRONG +#endif //defined (CY_USING_HAL) +#define CYBSP_SWDIO_ENABLED 1U +#define CYBSP_SWDIO_PORT GPIO_PRT6 +#define CYBSP_SWDIO_PORT_NUM 6U +#define CYBSP_SWDIO_PIN 6U +#define CYBSP_SWDIO_NUM 6U +#define CYBSP_SWDIO_DRIVEMODE CY_GPIO_DM_PULLUP +#define CYBSP_SWDIO_INIT_DRIVESTATE 1 +#ifndef ioss_0_port_6_pin_6_HSIOM + #define ioss_0_port_6_pin_6_HSIOM HSIOM_SEL_GPIO +#endif +#define CYBSP_SWDIO_HSIOM ioss_0_port_6_pin_6_HSIOM +#define CYBSP_SWDIO_IRQ ioss_interrupts_gpio_6_IRQn +#if defined (CY_USING_HAL) + #define CYBSP_SWDIO_HAL_PORT_PIN P6_6 +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_SWDIO_HAL_IRQ CYHAL_GPIO_IRQ_NONE +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_SWDIO_HAL_DIR CYHAL_GPIO_DIR_BIDIRECTIONAL +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_SWDIO_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_PULLUP +#endif //defined (CY_USING_HAL) +#define CYBSP_SWDCK_ENABLED 1U +#define CYBSP_SWDCK_PORT GPIO_PRT6 +#define CYBSP_SWDCK_PORT_NUM 6U +#define CYBSP_SWDCK_PIN 7U +#define CYBSP_SWDCK_NUM 7U +#define CYBSP_SWDCK_DRIVEMODE CY_GPIO_DM_PULLDOWN +#define CYBSP_SWDCK_INIT_DRIVESTATE 1 +#ifndef ioss_0_port_6_pin_7_HSIOM + #define ioss_0_port_6_pin_7_HSIOM HSIOM_SEL_GPIO +#endif +#define CYBSP_SWDCK_HSIOM ioss_0_port_6_pin_7_HSIOM +#define CYBSP_SWDCK_IRQ ioss_interrupts_gpio_6_IRQn +#if defined (CY_USING_HAL) + #define CYBSP_SWDCK_HAL_PORT_PIN P6_7 +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_SWDCK_HAL_IRQ CYHAL_GPIO_IRQ_NONE +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_SWDCK_HAL_DIR CYHAL_GPIO_DIR_BIDIRECTIONAL +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_SWDCK_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_PULLDOWN +#endif //defined (CY_USING_HAL) +#define CYBSP_CINA_ENABLED 1U +#define CYBSP_CINA_PORT GPIO_PRT7 +#define CYBSP_CINA_PORT_NUM 7U +#define CYBSP_CINA_PIN 1U +#define CYBSP_CINA_NUM 1U +#define CYBSP_CINA_DRIVEMODE CY_GPIO_DM_ANALOG +#define CYBSP_CINA_INIT_DRIVESTATE 1 +#ifndef ioss_0_port_7_pin_1_HSIOM + #define ioss_0_port_7_pin_1_HSIOM HSIOM_SEL_GPIO +#endif +#define CYBSP_CINA_HSIOM ioss_0_port_7_pin_1_HSIOM +#define CYBSP_CINA_IRQ ioss_interrupts_gpio_7_IRQn +#if defined (CY_USING_HAL) + #define CYBSP_CINA_HAL_PORT_PIN P7_1 +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CINA_HAL_IRQ CYHAL_GPIO_IRQ_NONE +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CINA_HAL_DIR CYHAL_GPIO_DIR_INPUT +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CINA_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_ANALOG +#endif //defined (CY_USING_HAL) +#define CYBSP_CINB_ENABLED 1U +#define CYBSP_CINB_PORT GPIO_PRT7 +#define CYBSP_CINB_PORT_NUM 7U +#define CYBSP_CINB_PIN 2U +#define CYBSP_CINB_NUM 2U +#define CYBSP_CINB_DRIVEMODE CY_GPIO_DM_ANALOG +#define CYBSP_CINB_INIT_DRIVESTATE 1 +#ifndef ioss_0_port_7_pin_2_HSIOM + #define ioss_0_port_7_pin_2_HSIOM HSIOM_SEL_GPIO +#endif +#define CYBSP_CINB_HSIOM ioss_0_port_7_pin_2_HSIOM +#define CYBSP_CINB_IRQ ioss_interrupts_gpio_7_IRQn +#if defined (CY_USING_HAL) + #define CYBSP_CINB_HAL_PORT_PIN P7_2 +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CINB_HAL_IRQ CYHAL_GPIO_IRQ_NONE +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CINB_HAL_DIR CYHAL_GPIO_DIR_INPUT +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CINB_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_ANALOG +#endif //defined (CY_USING_HAL) +#define CYBSP_CMOD_ENABLED 1U +#define CYBSP_CMOD_PORT GPIO_PRT7 +#define CYBSP_CMOD_PORT_NUM 7U +#define CYBSP_CMOD_PIN 7U +#define CYBSP_CMOD_NUM 7U +#define CYBSP_CMOD_DRIVEMODE CY_GPIO_DM_ANALOG +#define CYBSP_CMOD_INIT_DRIVESTATE 1 +#ifndef ioss_0_port_7_pin_7_HSIOM + #define ioss_0_port_7_pin_7_HSIOM HSIOM_SEL_GPIO +#endif +#define CYBSP_CMOD_HSIOM ioss_0_port_7_pin_7_HSIOM +#define CYBSP_CMOD_IRQ ioss_interrupts_gpio_7_IRQn +#if defined (CY_USING_HAL) + #define CYBSP_CMOD_HAL_PORT_PIN P7_7 +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CMOD_HAL_IRQ CYHAL_GPIO_IRQ_NONE +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CMOD_HAL_DIR CYHAL_GPIO_DIR_INPUT +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CMOD_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_ANALOG +#endif //defined (CY_USING_HAL) +#define CYBSP_CSD_BTN0_ENABLED 1U +#define CYBSP_CSD_BTN0_PORT GPIO_PRT8 +#define CYBSP_CSD_BTN0_PORT_NUM 8U +#define CYBSP_CSD_BTN0_PIN 1U +#define CYBSP_CSD_BTN0_NUM 1U +#define CYBSP_CSD_BTN0_DRIVEMODE CY_GPIO_DM_ANALOG +#define CYBSP_CSD_BTN0_INIT_DRIVESTATE 1 +#ifndef ioss_0_port_8_pin_1_HSIOM + #define ioss_0_port_8_pin_1_HSIOM HSIOM_SEL_GPIO +#endif +#define CYBSP_CSD_BTN0_HSIOM ioss_0_port_8_pin_1_HSIOM +#define CYBSP_CSD_BTN0_IRQ ioss_interrupts_gpio_8_IRQn +#if defined (CY_USING_HAL) + #define CYBSP_CSD_BTN0_HAL_PORT_PIN P8_1 +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_BTN0_HAL_IRQ CYHAL_GPIO_IRQ_NONE +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_BTN0_HAL_DIR CYHAL_GPIO_DIR_INPUT +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_BTN0_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_ANALOG +#endif //defined (CY_USING_HAL) +#define CYBSP_CSD_BTN1_ENABLED 1U +#define CYBSP_CSD_BTN1_PORT GPIO_PRT8 +#define CYBSP_CSD_BTN1_PORT_NUM 8U +#define CYBSP_CSD_BTN1_PIN 2U +#define CYBSP_CSD_BTN1_NUM 2U +#define CYBSP_CSD_BTN1_DRIVEMODE CY_GPIO_DM_ANALOG +#define CYBSP_CSD_BTN1_INIT_DRIVESTATE 1 +#ifndef ioss_0_port_8_pin_2_HSIOM + #define ioss_0_port_8_pin_2_HSIOM HSIOM_SEL_GPIO +#endif +#define CYBSP_CSD_BTN1_HSIOM ioss_0_port_8_pin_2_HSIOM +#define CYBSP_CSD_BTN1_IRQ ioss_interrupts_gpio_8_IRQn +#if defined (CY_USING_HAL) + #define CYBSP_CSD_BTN1_HAL_PORT_PIN P8_2 +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_BTN1_HAL_IRQ CYHAL_GPIO_IRQ_NONE +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_BTN1_HAL_DIR CYHAL_GPIO_DIR_INPUT +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_BTN1_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_ANALOG +#endif //defined (CY_USING_HAL) +#define CYBSP_CSD_SLD0_ENABLED 1U +#define CYBSP_CSD_SLD0_PORT GPIO_PRT8 +#define CYBSP_CSD_SLD0_PORT_NUM 8U +#define CYBSP_CSD_SLD0_PIN 3U +#define CYBSP_CSD_SLD0_NUM 3U +#define CYBSP_CSD_SLD0_DRIVEMODE CY_GPIO_DM_ANALOG +#define CYBSP_CSD_SLD0_INIT_DRIVESTATE 1 +#ifndef ioss_0_port_8_pin_3_HSIOM + #define ioss_0_port_8_pin_3_HSIOM HSIOM_SEL_GPIO +#endif +#define CYBSP_CSD_SLD0_HSIOM ioss_0_port_8_pin_3_HSIOM +#define CYBSP_CSD_SLD0_IRQ ioss_interrupts_gpio_8_IRQn +#if defined (CY_USING_HAL) + #define CYBSP_CSD_SLD0_HAL_PORT_PIN P8_3 +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_SLD0_HAL_IRQ CYHAL_GPIO_IRQ_NONE +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_SLD0_HAL_DIR CYHAL_GPIO_DIR_INPUT +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_SLD0_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_ANALOG +#endif //defined (CY_USING_HAL) +#define CYBSP_CSD_SLD1_ENABLED 1U +#define CYBSP_CSD_SLD1_PORT GPIO_PRT8 +#define CYBSP_CSD_SLD1_PORT_NUM 8U +#define CYBSP_CSD_SLD1_PIN 4U +#define CYBSP_CSD_SLD1_NUM 4U +#define CYBSP_CSD_SLD1_DRIVEMODE CY_GPIO_DM_ANALOG +#define CYBSP_CSD_SLD1_INIT_DRIVESTATE 1 +#ifndef ioss_0_port_8_pin_4_HSIOM + #define ioss_0_port_8_pin_4_HSIOM HSIOM_SEL_GPIO +#endif +#define CYBSP_CSD_SLD1_HSIOM ioss_0_port_8_pin_4_HSIOM +#define CYBSP_CSD_SLD1_IRQ ioss_interrupts_gpio_8_IRQn +#if defined (CY_USING_HAL) + #define CYBSP_CSD_SLD1_HAL_PORT_PIN P8_4 +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_SLD1_HAL_IRQ CYHAL_GPIO_IRQ_NONE +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_SLD1_HAL_DIR CYHAL_GPIO_DIR_INPUT +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_SLD1_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_ANALOG +#endif //defined (CY_USING_HAL) +#define CYBSP_CSD_SLD2_ENABLED 1U +#define CYBSP_CSD_SLD2_PORT GPIO_PRT8 +#define CYBSP_CSD_SLD2_PORT_NUM 8U +#define CYBSP_CSD_SLD2_PIN 5U +#define CYBSP_CSD_SLD2_NUM 5U +#define CYBSP_CSD_SLD2_DRIVEMODE CY_GPIO_DM_ANALOG +#define CYBSP_CSD_SLD2_INIT_DRIVESTATE 1 +#ifndef ioss_0_port_8_pin_5_HSIOM + #define ioss_0_port_8_pin_5_HSIOM HSIOM_SEL_GPIO +#endif +#define CYBSP_CSD_SLD2_HSIOM ioss_0_port_8_pin_5_HSIOM +#define CYBSP_CSD_SLD2_IRQ ioss_interrupts_gpio_8_IRQn +#if defined (CY_USING_HAL) + #define CYBSP_CSD_SLD2_HAL_PORT_PIN P8_5 +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_SLD2_HAL_IRQ CYHAL_GPIO_IRQ_NONE +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_SLD2_HAL_DIR CYHAL_GPIO_DIR_INPUT +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_SLD2_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_ANALOG +#endif //defined (CY_USING_HAL) +#define CYBSP_CSD_SLD3_ENABLED 1U +#define CYBSP_CSD_SLD3_PORT GPIO_PRT8 +#define CYBSP_CSD_SLD3_PORT_NUM 8U +#define CYBSP_CSD_SLD3_PIN 6U +#define CYBSP_CSD_SLD3_NUM 6U +#define CYBSP_CSD_SLD3_DRIVEMODE CY_GPIO_DM_ANALOG +#define CYBSP_CSD_SLD3_INIT_DRIVESTATE 1 +#ifndef ioss_0_port_8_pin_6_HSIOM + #define ioss_0_port_8_pin_6_HSIOM HSIOM_SEL_GPIO +#endif +#define CYBSP_CSD_SLD3_HSIOM ioss_0_port_8_pin_6_HSIOM +#define CYBSP_CSD_SLD3_IRQ ioss_interrupts_gpio_8_IRQn +#if defined (CY_USING_HAL) + #define CYBSP_CSD_SLD3_HAL_PORT_PIN P8_6 +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_SLD3_HAL_IRQ CYHAL_GPIO_IRQ_NONE +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_SLD3_HAL_DIR CYHAL_GPIO_DIR_INPUT +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_SLD3_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_ANALOG +#endif //defined (CY_USING_HAL) +#define CYBSP_CSD_SLD4_ENABLED 1U +#define CYBSP_CSD_SLD4_PORT GPIO_PRT8 +#define CYBSP_CSD_SLD4_PORT_NUM 8U +#define CYBSP_CSD_SLD4_PIN 7U +#define CYBSP_CSD_SLD4_NUM 7U +#define CYBSP_CSD_SLD4_DRIVEMODE CY_GPIO_DM_ANALOG +#define CYBSP_CSD_SLD4_INIT_DRIVESTATE 1 +#ifndef ioss_0_port_8_pin_7_HSIOM + #define ioss_0_port_8_pin_7_HSIOM HSIOM_SEL_GPIO +#endif +#define CYBSP_CSD_SLD4_HSIOM ioss_0_port_8_pin_7_HSIOM +#define CYBSP_CSD_SLD4_IRQ ioss_interrupts_gpio_8_IRQn +#if defined (CY_USING_HAL) + #define CYBSP_CSD_SLD4_HAL_PORT_PIN P8_7 +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_SLD4_HAL_IRQ CYHAL_GPIO_IRQ_NONE +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_SLD4_HAL_DIR CYHAL_GPIO_DIR_INPUT +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + #define CYBSP_CSD_SLD4_HAL_DRIVEMODE CYHAL_GPIO_DRIVE_ANALOG +#endif //defined (CY_USING_HAL) + +extern const cy_stc_gpio_pin_config_t CYBSP_WCO_IN_config; +#if defined (CY_USING_HAL) + extern const cyhal_resource_inst_t CYBSP_WCO_IN_obj; +#endif //defined (CY_USING_HAL) +extern const cy_stc_gpio_pin_config_t CYBSP_WCO_OUT_config; +#if defined (CY_USING_HAL) + extern const cyhal_resource_inst_t CYBSP_WCO_OUT_obj; +#endif //defined (CY_USING_HAL) +extern const cy_stc_gpio_pin_config_t CYBSP_CSD_RX_config; +#if defined (CY_USING_HAL) + extern const cyhal_resource_inst_t CYBSP_CSD_RX_obj; +#endif //defined (CY_USING_HAL) +extern const cy_stc_gpio_pin_config_t CYBSP_SWO_config; +#if defined (CY_USING_HAL) + extern const cyhal_resource_inst_t CYBSP_SWO_obj; +#endif //defined (CY_USING_HAL) +extern const cy_stc_gpio_pin_config_t CYBSP_SWDIO_config; +#if defined (CY_USING_HAL) + extern const cyhal_resource_inst_t CYBSP_SWDIO_obj; +#endif //defined (CY_USING_HAL) +extern const cy_stc_gpio_pin_config_t CYBSP_SWDCK_config; +#if defined (CY_USING_HAL) + extern const cyhal_resource_inst_t CYBSP_SWDCK_obj; +#endif //defined (CY_USING_HAL) +extern const cy_stc_gpio_pin_config_t CYBSP_CINA_config; +#if defined (CY_USING_HAL) + extern const cyhal_resource_inst_t CYBSP_CINA_obj; +#endif //defined (CY_USING_HAL) +extern const cy_stc_gpio_pin_config_t CYBSP_CINB_config; +#if defined (CY_USING_HAL) + extern const cyhal_resource_inst_t CYBSP_CINB_obj; +#endif //defined (CY_USING_HAL) +extern const cy_stc_gpio_pin_config_t CYBSP_CMOD_config; +#if defined (CY_USING_HAL) + extern const cyhal_resource_inst_t CYBSP_CMOD_obj; +#endif //defined (CY_USING_HAL) +extern const cy_stc_gpio_pin_config_t CYBSP_CSD_BTN0_config; +#if defined (CY_USING_HAL) + extern const cyhal_resource_inst_t CYBSP_CSD_BTN0_obj; +#endif //defined (CY_USING_HAL) +extern const cy_stc_gpio_pin_config_t CYBSP_CSD_BTN1_config; +#if defined (CY_USING_HAL) + extern const cyhal_resource_inst_t CYBSP_CSD_BTN1_obj; +#endif //defined (CY_USING_HAL) +extern const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD0_config; +#if defined (CY_USING_HAL) + extern const cyhal_resource_inst_t CYBSP_CSD_SLD0_obj; +#endif //defined (CY_USING_HAL) +extern const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD1_config; +#if defined (CY_USING_HAL) + extern const cyhal_resource_inst_t CYBSP_CSD_SLD1_obj; +#endif //defined (CY_USING_HAL) +extern const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD2_config; +#if defined (CY_USING_HAL) + extern const cyhal_resource_inst_t CYBSP_CSD_SLD2_obj; +#endif //defined (CY_USING_HAL) +extern const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD3_config; +#if defined (CY_USING_HAL) + extern const cyhal_resource_inst_t CYBSP_CSD_SLD3_obj; +#endif //defined (CY_USING_HAL) +extern const cy_stc_gpio_pin_config_t CYBSP_CSD_SLD4_config; +#if defined (CY_USING_HAL) + extern const cyhal_resource_inst_t CYBSP_CSD_SLD4_obj; +#endif //defined (CY_USING_HAL) + +void init_cycfg_pins(void); + +#if defined(__cplusplus) +} +#endif + + +#endif /* CYCFG_PINS_H */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_qspi_memslot.c b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_qspi_memslot.c new file mode 100644 index 00000000000..417ad4426e8 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_qspi_memslot.c @@ -0,0 +1,266 @@ +/******************************************************************************* +* File Name: cycfg_qspi_memslot.c +* +* Description: +* Provides definitions of the SMIF-driver memory configuration. +* This file was automatically generated and should not be modified. +* QSPI Configurator: 2.0.0.1367 +* +******************************************************************************** +* Copyright 2017-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +********************************************************************************/ + +#include "cycfg_qspi_memslot.h" + +const cy_stc_smif_mem_cmd_t S25FL512S_4byteaddr_SlaveSlot_0_readCmd = +{ + /* The 8-bit command. 1 x I/O read command. */ + .command = 0xECU, + /* The width of the command transfer. */ + .cmdWidth = CY_SMIF_WIDTH_SINGLE, + /* The width of the address transfer. */ + .addrWidth = CY_SMIF_WIDTH_QUAD, + /* The 8-bit mode byte. This value is 0xFFFFFFFF when there is no mode present. */ + .mode = 0x01U, + /* The width of the mode command transfer. */ + .modeWidth = CY_SMIF_WIDTH_QUAD, + /* The number of dummy cycles. A zero value suggests no dummy cycles. */ + .dummyCycles = 4U, + /* The width of the data transfer. */ + .dataWidth = CY_SMIF_WIDTH_QUAD +}; + +const cy_stc_smif_mem_cmd_t S25FL512S_4byteaddr_SlaveSlot_0_writeEnCmd = +{ + /* The 8-bit command. 1 x I/O read command. */ + .command = 0x06U, + /* The width of the command transfer. */ + .cmdWidth = CY_SMIF_WIDTH_SINGLE, + /* The width of the address transfer. */ + .addrWidth = CY_SMIF_WIDTH_SINGLE, + /* The 8-bit mode byte. This value is 0xFFFFFFFF when there is no mode present. */ + .mode = 0xFFFFFFFFU, + /* The width of the mode command transfer. */ + .modeWidth = CY_SMIF_WIDTH_SINGLE, + /* The number of dummy cycles. A zero value suggests no dummy cycles. */ + .dummyCycles = 0U, + /* The width of the data transfer. */ + .dataWidth = CY_SMIF_WIDTH_SINGLE +}; + +const cy_stc_smif_mem_cmd_t S25FL512S_4byteaddr_SlaveSlot_0_writeDisCmd = +{ + /* The 8-bit command. 1 x I/O read command. */ + .command = 0x04U, + /* The width of the command transfer. */ + .cmdWidth = CY_SMIF_WIDTH_SINGLE, + /* The width of the address transfer. */ + .addrWidth = CY_SMIF_WIDTH_SINGLE, + /* The 8-bit mode byte. This value is 0xFFFFFFFF when there is no mode present. */ + .mode = 0xFFFFFFFFU, + /* The width of the mode command transfer. */ + .modeWidth = CY_SMIF_WIDTH_SINGLE, + /* The number of dummy cycles. A zero value suggests no dummy cycles. */ + .dummyCycles = 0U, + /* The width of the data transfer. */ + .dataWidth = CY_SMIF_WIDTH_SINGLE +}; + +const cy_stc_smif_mem_cmd_t S25FL512S_4byteaddr_SlaveSlot_0_eraseCmd = +{ + /* The 8-bit command. 1 x I/O read command. */ + .command = 0xDCU, + /* The width of the command transfer. */ + .cmdWidth = CY_SMIF_WIDTH_SINGLE, + /* The width of the address transfer. */ + .addrWidth = CY_SMIF_WIDTH_SINGLE, + /* The 8-bit mode byte. This value is 0xFFFFFFFF when there is no mode present. */ + .mode = 0xFFFFFFFFU, + /* The width of the mode command transfer. */ + .modeWidth = CY_SMIF_WIDTH_SINGLE, + /* The number of dummy cycles. A zero value suggests no dummy cycles. */ + .dummyCycles = 0U, + /* The width of the data transfer. */ + .dataWidth = CY_SMIF_WIDTH_SINGLE +}; + +const cy_stc_smif_mem_cmd_t S25FL512S_4byteaddr_SlaveSlot_0_chipEraseCmd = +{ + /* The 8-bit command. 1 x I/O read command. */ + .command = 0x60U, + /* The width of the command transfer. */ + .cmdWidth = CY_SMIF_WIDTH_SINGLE, + /* The width of the address transfer. */ + .addrWidth = CY_SMIF_WIDTH_SINGLE, + /* The 8-bit mode byte. This value is 0xFFFFFFFF when there is no mode present. */ + .mode = 0xFFFFFFFFU, + /* The width of the mode command transfer. */ + .modeWidth = CY_SMIF_WIDTH_SINGLE, + /* The number of dummy cycles. A zero value suggests no dummy cycles. */ + .dummyCycles = 0U, + /* The width of the data transfer. */ + .dataWidth = CY_SMIF_WIDTH_SINGLE +}; + +const cy_stc_smif_mem_cmd_t S25FL512S_4byteaddr_SlaveSlot_0_programCmd = +{ + /* The 8-bit command. 1 x I/O read command. */ + .command = 0x34U, + /* The width of the command transfer. */ + .cmdWidth = CY_SMIF_WIDTH_SINGLE, + /* The width of the address transfer. */ + .addrWidth = CY_SMIF_WIDTH_SINGLE, + /* The 8-bit mode byte. This value is 0xFFFFFFFF when there is no mode present. */ + .mode = 0xFFFFFFFFU, + /* The width of the mode command transfer. */ + .modeWidth = CY_SMIF_WIDTH_QUAD, + /* The number of dummy cycles. A zero value suggests no dummy cycles. */ + .dummyCycles = 0U, + /* The width of the data transfer. */ + .dataWidth = CY_SMIF_WIDTH_QUAD +}; + +const cy_stc_smif_mem_cmd_t S25FL512S_4byteaddr_SlaveSlot_0_readStsRegQeCmd = +{ + /* The 8-bit command. 1 x I/O read command. */ + .command = 0x35U, + /* The width of the command transfer. */ + .cmdWidth = CY_SMIF_WIDTH_SINGLE, + /* The width of the address transfer. */ + .addrWidth = CY_SMIF_WIDTH_SINGLE, + /* The 8-bit mode byte. This value is 0xFFFFFFFF when there is no mode present. */ + .mode = 0xFFFFFFFFU, + /* The width of the mode command transfer. */ + .modeWidth = CY_SMIF_WIDTH_SINGLE, + /* The number of dummy cycles. A zero value suggests no dummy cycles. */ + .dummyCycles = 0U, + /* The width of the data transfer. */ + .dataWidth = CY_SMIF_WIDTH_SINGLE +}; + +const cy_stc_smif_mem_cmd_t S25FL512S_4byteaddr_SlaveSlot_0_readStsRegWipCmd = +{ + /* The 8-bit command. 1 x I/O read command. */ + .command = 0x05U, + /* The width of the command transfer. */ + .cmdWidth = CY_SMIF_WIDTH_SINGLE, + /* The width of the address transfer. */ + .addrWidth = CY_SMIF_WIDTH_SINGLE, + /* The 8-bit mode byte. This value is 0xFFFFFFFF when there is no mode present. */ + .mode = 0xFFFFFFFFU, + /* The width of the mode command transfer. */ + .modeWidth = CY_SMIF_WIDTH_SINGLE, + /* The number of dummy cycles. A zero value suggests no dummy cycles. */ + .dummyCycles = 0U, + /* The width of the data transfer. */ + .dataWidth = CY_SMIF_WIDTH_SINGLE +}; + +const cy_stc_smif_mem_cmd_t S25FL512S_4byteaddr_SlaveSlot_0_writeStsRegQeCmd = +{ + /* The 8-bit command. 1 x I/O read command. */ + .command = 0x01U, + /* The width of the command transfer. */ + .cmdWidth = CY_SMIF_WIDTH_SINGLE, + /* The width of the address transfer. */ + .addrWidth = CY_SMIF_WIDTH_SINGLE, + /* The 8-bit mode byte. This value is 0xFFFFFFFF when there is no mode present. */ + .mode = 0xFFFFFFFFU, + /* The width of the mode command transfer. */ + .modeWidth = CY_SMIF_WIDTH_SINGLE, + /* The number of dummy cycles. A zero value suggests no dummy cycles. */ + .dummyCycles = 0U, + /* The width of the data transfer. */ + .dataWidth = CY_SMIF_WIDTH_SINGLE +}; + +const cy_stc_smif_mem_device_cfg_t deviceCfg_S25FL512S_4byteaddr_SlaveSlot_0 = +{ + /* Specifies the number of address bytes used by the memory slave device. */ + .numOfAddrBytes = 0x04U, + /* The size of the memory. */ + .memSize = 0x04000000U, + /* Specifies the Read command. */ + .readCmd = (cy_stc_smif_mem_cmd_t*)&S25FL512S_4byteaddr_SlaveSlot_0_readCmd, + /* Specifies the Write Enable command. */ + .writeEnCmd = (cy_stc_smif_mem_cmd_t*)&S25FL512S_4byteaddr_SlaveSlot_0_writeEnCmd, + /* Specifies the Write Disable command. */ + .writeDisCmd = (cy_stc_smif_mem_cmd_t*)&S25FL512S_4byteaddr_SlaveSlot_0_writeDisCmd, + /* Specifies the Erase command. */ + .eraseCmd = (cy_stc_smif_mem_cmd_t*)&S25FL512S_4byteaddr_SlaveSlot_0_eraseCmd, + /* Specifies the sector size of each erase. */ + .eraseSize = 0x00040000U, + /* Specifies the Chip Erase command. */ + .chipEraseCmd = (cy_stc_smif_mem_cmd_t*)&S25FL512S_4byteaddr_SlaveSlot_0_chipEraseCmd, + /* Specifies the Program command. */ + .programCmd = (cy_stc_smif_mem_cmd_t*)&S25FL512S_4byteaddr_SlaveSlot_0_programCmd, + /* Specifies the page size for programming. */ + .programSize = 0x00000200U, + /* Specifies the command to read the QE-containing status register. */ + .readStsRegQeCmd = (cy_stc_smif_mem_cmd_t*)&S25FL512S_4byteaddr_SlaveSlot_0_readStsRegQeCmd, + /* Specifies the command to read the WIP-containing status register. */ + .readStsRegWipCmd = (cy_stc_smif_mem_cmd_t*)&S25FL512S_4byteaddr_SlaveSlot_0_readStsRegWipCmd, + /* Specifies the command to write into the QE-containing status register. */ + .writeStsRegQeCmd = (cy_stc_smif_mem_cmd_t*)&S25FL512S_4byteaddr_SlaveSlot_0_writeStsRegQeCmd, + /* The mask for the status register. */ + .stsRegBusyMask = 0x01U, + /* The mask for the status register. */ + .stsRegQuadEnableMask = 0x02U, + /* The max time for the erase type-1 cycle-time in ms. */ + .eraseTime = 2600U, + /* The max time for the chip-erase cycle-time in ms. */ + .chipEraseTime = 460000U, + /* The max time for the page-program cycle-time in us. */ + .programTime = 1300U +}; + +const cy_stc_smif_mem_config_t S25FL512S_4byteaddr_SlaveSlot_0 = +{ + /* Determines the slot number where the memory device is placed. */ + .slaveSelect = CY_SMIF_SLAVE_SELECT_0, + /* Flags. */ + .flags = CY_SMIF_FLAG_MEMORY_MAPPED | CY_SMIF_FLAG_WR_EN, + /* The data-line selection options for a slave device. */ + .dataSelect = CY_SMIF_DATA_SEL0, + /* The base address the memory slave is mapped to in the PSoC memory map. + Valid when the memory-mapped mode is enabled. */ + .baseAddress = 0x18000000U, + /* The size allocated in the PSoC memory map, for the memory slave device. + The size is allocated from the base address. Valid when the memory mapped mode is enabled. */ + .memMappedSize = 0x4000000U, + /* If this memory device is one of the devices in the dual quad SPI configuration. + Valid when the memory mapped mode is enabled. */ + .dualQuadSlots = 0, + /* The configuration of the device. */ + .deviceCfg = (cy_stc_smif_mem_device_cfg_t*)&deviceCfg_S25FL512S_4byteaddr_SlaveSlot_0 +}; + +const cy_stc_smif_mem_config_t* const smifMemConfigs[] = { + &S25FL512S_4byteaddr_SlaveSlot_0 +}; + +const cy_stc_smif_block_config_t smifBlockConfig = +{ + /* The number of SMIF memories defined. */ + .memCount = CY_SMIF_DEVICE_NUM, + /* The pointer to the array of memory config structures of size memCount. */ + .memConfig = (cy_stc_smif_mem_config_t**)smifMemConfigs, + /* The version of the SMIF driver. */ + .majorVersion = CY_SMIF_DRV_VERSION_MAJOR, + /* The version of the SMIF driver. */ + .minorVersion = CY_SMIF_DRV_VERSION_MINOR +}; + diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_qspi_memslot.h b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_qspi_memslot.h new file mode 100644 index 00000000000..086f1db7365 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_qspi_memslot.h @@ -0,0 +1,51 @@ +/******************************************************************************* +* File Name: cycfg_qspi_memslot.h +* +* Description: +* Provides declarations of the SMIF-driver memory configuration. +* This file was automatically generated and should not be modified. +* QSPI Configurator: 2.0.0.1367 +* +******************************************************************************** +* Copyright 2017-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +********************************************************************************/ + +#ifndef CYCFG_QSPI_MEMSLOT_H +#define CYCFG_QSPI_MEMSLOT_H +#include "cy_smif_memslot.h" + +#define CY_SMIF_DEVICE_NUM 1 + +extern const cy_stc_smif_mem_cmd_t S25FL512S_4byteaddr_SlaveSlot_0_readCmd; +extern const cy_stc_smif_mem_cmd_t S25FL512S_4byteaddr_SlaveSlot_0_writeEnCmd; +extern const cy_stc_smif_mem_cmd_t S25FL512S_4byteaddr_SlaveSlot_0_writeDisCmd; +extern const cy_stc_smif_mem_cmd_t S25FL512S_4byteaddr_SlaveSlot_0_eraseCmd; +extern const cy_stc_smif_mem_cmd_t S25FL512S_4byteaddr_SlaveSlot_0_chipEraseCmd; +extern const cy_stc_smif_mem_cmd_t S25FL512S_4byteaddr_SlaveSlot_0_programCmd; +extern const cy_stc_smif_mem_cmd_t S25FL512S_4byteaddr_SlaveSlot_0_readStsRegQeCmd; +extern const cy_stc_smif_mem_cmd_t S25FL512S_4byteaddr_SlaveSlot_0_readStsRegWipCmd; +extern const cy_stc_smif_mem_cmd_t S25FL512S_4byteaddr_SlaveSlot_0_writeStsRegQeCmd; + +extern const cy_stc_smif_mem_device_cfg_t deviceCfg_S25FL512S_4byteaddr_SlaveSlot_0; + +extern const cy_stc_smif_mem_config_t S25FL512S_4byteaddr_SlaveSlot_0; +extern const cy_stc_smif_mem_config_t* const smifMemConfigs[CY_SMIF_DEVICE_NUM]; + +extern const cy_stc_smif_block_config_t smifBlockConfig; + + +#endif /*CY_SMIF_MEMCONFIG_H*/ + diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_routing.c b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_routing.c new file mode 100644 index 00000000000..cb52455ed59 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_routing.c @@ -0,0 +1,41 @@ +/******************************************************************************* +* File Name: cycfg_routing.c +* +* Description: +* Establishes all necessary connections between hardware elements. +* This file was automatically generated and should not be modified. +* cfg-backend-cli: 1.2.0.1478 +* Device Support Library (../../../../output/psoc6/psoc6pdl): 1.4.0.1571 +* +******************************************************************************** +* Copyright 2017-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +********************************************************************************/ + +#include "cycfg_routing.h" + +#include "cy_device_headers.h" + +void init_cycfg_routing(void) +{ + HSIOM->AMUX_SPLIT_CTL[2] = HSIOM_AMUX_SPLIT_CTL_SWITCH_AA_SL_Msk | + HSIOM_AMUX_SPLIT_CTL_SWITCH_AA_SR_Msk | + HSIOM_AMUX_SPLIT_CTL_SWITCH_BB_SL_Msk | + HSIOM_AMUX_SPLIT_CTL_SWITCH_BB_SR_Msk; + HSIOM->AMUX_SPLIT_CTL[4] = HSIOM_AMUX_SPLIT_CTL_SWITCH_AA_SL_Msk | + HSIOM_AMUX_SPLIT_CTL_SWITCH_AA_SR_Msk | + HSIOM_AMUX_SPLIT_CTL_SWITCH_BB_SL_Msk | + HSIOM_AMUX_SPLIT_CTL_SWITCH_BB_SR_Msk; +} diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_routing.h b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_routing.h new file mode 100644 index 00000000000..b26ae3cc61c --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_routing.h @@ -0,0 +1,59 @@ +/******************************************************************************* +* File Name: cycfg_routing.h +* +* Description: +* Establishes all necessary connections between hardware elements. +* This file was automatically generated and should not be modified. +* cfg-backend-cli: 1.2.0.1478 +* Device Support Library (../../../../output/psoc6/psoc6pdl): 1.4.0.1571 +* +******************************************************************************** +* Copyright 2017-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +********************************************************************************/ + +#if !defined(CYCFG_ROUTING_H) +#define CYCFG_ROUTING_H + +#if defined(__cplusplus) +extern "C" { +#endif + +#include "cycfg_notices.h" +void init_cycfg_routing(void); +#define init_cycfg_connectivity() init_cycfg_routing() +#define ioss_0_port_0_pin_0_ANALOG P0_0_SRSS_WCO_IN +#define ioss_0_port_0_pin_1_ANALOG P0_1_SRSS_WCO_OUT +#define ioss_0_port_1_pin_0_HSIOM HSIOM_SEL_AMUXB +#define ioss_0_port_6_pin_4_HSIOM P6_4_CPUSS_SWJ_SWO_TDO +#define ioss_0_port_6_pin_6_HSIOM P6_6_CPUSS_SWJ_SWDIO_TMS +#define ioss_0_port_6_pin_7_HSIOM P6_7_CPUSS_SWJ_SWCLK_TCLK +#define ioss_0_port_7_pin_1_HSIOM HSIOM_SEL_AMUXB +#define ioss_0_port_7_pin_2_HSIOM HSIOM_SEL_AMUXB +#define ioss_0_port_7_pin_7_HSIOM HSIOM_SEL_AMUXB +#define ioss_0_port_8_pin_1_HSIOM HSIOM_SEL_AMUXB +#define ioss_0_port_8_pin_2_HSIOM HSIOM_SEL_AMUXB +#define ioss_0_port_8_pin_3_HSIOM HSIOM_SEL_AMUXB +#define ioss_0_port_8_pin_4_HSIOM HSIOM_SEL_AMUXB +#define ioss_0_port_8_pin_5_HSIOM HSIOM_SEL_AMUXB +#define ioss_0_port_8_pin_6_HSIOM HSIOM_SEL_AMUXB +#define ioss_0_port_8_pin_7_HSIOM HSIOM_SEL_AMUXB + +#if defined(__cplusplus) +} +#endif + + +#endif /* CYCFG_ROUTING_H */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_system.c b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_system.c new file mode 100644 index 00000000000..56b1a8aaf72 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_system.c @@ -0,0 +1,579 @@ +/******************************************************************************* +* File Name: cycfg_system.c +* +* Description: +* System configuration +* This file was automatically generated and should not be modified. +* cfg-backend-cli: 1.2.0.1478 +* Device Support Library (../../../../output/psoc6/psoc6pdl): 1.4.0.1571 +* +******************************************************************************** +* Copyright 2017-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +********************************************************************************/ + +#include "cycfg_system.h" + +#define CY_CFG_SYSCLK_ECO_ERROR 1 +#define CY_CFG_SYSCLK_ALTHF_ERROR 2 +#define CY_CFG_SYSCLK_PLL_ERROR 3 +#define CY_CFG_SYSCLK_FLL_ERROR 4 +#define CY_CFG_SYSCLK_WCO_ERROR 5 +#define CY_CFG_SYSCLK_CLKALTSYSTICK_ENABLED 1 +#define CY_CFG_SYSCLK_CLKBAK_ENABLED 1 +#define CY_CFG_SYSCLK_CLKFAST_ENABLED 1 +#define CY_CFG_SYSCLK_FLL_ENABLED 1 +#define CY_CFG_SYSCLK_CLKHF0_ENABLED 1 +#define CY_CFG_SYSCLK_CLKHF0_FREQ_MHZ 100UL +#define CY_CFG_SYSCLK_CLKHF0_CLKPATH CY_SYSCLK_CLKHF_IN_CLKPATH0 +#define CY_CFG_SYSCLK_CLKHF2_ENABLED 1 +#define CY_CFG_SYSCLK_CLKHF2_FREQ_MHZ 50UL +#define CY_CFG_SYSCLK_CLKHF2_CLKPATH CY_SYSCLK_CLKHF_IN_CLKPATH0 +#define CY_CFG_SYSCLK_CLKHF3_ENABLED 1 +#define CY_CFG_SYSCLK_CLKHF3_FREQ_MHZ 48UL +#define CY_CFG_SYSCLK_CLKHF3_CLKPATH CY_SYSCLK_CLKHF_IN_CLKPATH1 +#define CY_CFG_SYSCLK_ILO_ENABLED 1 +#define CY_CFG_SYSCLK_IMO_ENABLED 1 +#define CY_CFG_SYSCLK_CLKLF_ENABLED 1 +#define CY_CFG_SYSCLK_CLKPATH0_ENABLED 1 +#define CY_CFG_SYSCLK_CLKPATH0_SOURCE CY_SYSCLK_CLKPATH_IN_IMO +#define CY_CFG_SYSCLK_CLKPATH1_ENABLED 1 +#define CY_CFG_SYSCLK_CLKPATH1_SOURCE CY_SYSCLK_CLKPATH_IN_IMO +#define CY_CFG_SYSCLK_CLKPATH2_ENABLED 1 +#define CY_CFG_SYSCLK_CLKPATH2_SOURCE CY_SYSCLK_CLKPATH_IN_IMO +#define CY_CFG_SYSCLK_CLKPATH3_ENABLED 1 +#define CY_CFG_SYSCLK_CLKPATH3_SOURCE CY_SYSCLK_CLKPATH_IN_IMO +#define CY_CFG_SYSCLK_CLKPATH4_ENABLED 1 +#define CY_CFG_SYSCLK_CLKPATH4_SOURCE CY_SYSCLK_CLKPATH_IN_IMO +#define CY_CFG_SYSCLK_CLKPERI_ENABLED 1 +#define CY_CFG_SYSCLK_PLL0_ENABLED 1 +#define CY_CFG_SYSCLK_CLKSLOW_ENABLED 1 +#define CY_CFG_SYSCLK_CLKTIMER_ENABLED 1 +#define CY_CFG_SYSCLK_WCO_ENABLED 1 +#define CY_CFG_PWR_ENABLED 1 +#define CY_CFG_PWR_INIT 1 +#define CY_CFG_PWR_USING_PMIC 0 +#define CY_CFG_PWR_VBACKUP_USING_VDDD 1 +#define CY_CFG_PWR_LDO_VOLTAGE CY_SYSPM_LDO_VOLTAGE_LP +#define CY_CFG_PWR_USING_ULP 0 + +static const cy_stc_fll_manual_config_t srss_0_clock_0_fll_0_fllConfig = +{ + .fllMult = 500U, + .refDiv = 20U, + .ccoRange = CY_SYSCLK_FLL_CCO_RANGE4, + .enableOutputDiv = true, + .lockTolerance = 10U, + .igain = 9U, + .pgain = 5U, + .settlingCount = 8U, + .outputMode = CY_SYSCLK_FLLPLL_OUTPUT_OUTPUT, + .cco_Freq = 355U, +}; +#if defined (CY_USING_HAL) + const cyhal_resource_inst_t srss_0_clock_0_pathmux_0_obj = + { + .type = CYHAL_RSC_CLKPATH, + .block_num = 0U, + .channel_num = 0U, + }; +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + const cyhal_resource_inst_t srss_0_clock_0_pathmux_1_obj = + { + .type = CYHAL_RSC_CLKPATH, + .block_num = 1U, + .channel_num = 0U, + }; +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + const cyhal_resource_inst_t srss_0_clock_0_pathmux_2_obj = + { + .type = CYHAL_RSC_CLKPATH, + .block_num = 2U, + .channel_num = 0U, + }; +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + const cyhal_resource_inst_t srss_0_clock_0_pathmux_3_obj = + { + .type = CYHAL_RSC_CLKPATH, + .block_num = 3U, + .channel_num = 0U, + }; +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + const cyhal_resource_inst_t srss_0_clock_0_pathmux_4_obj = + { + .type = CYHAL_RSC_CLKPATH, + .block_num = 4U, + .channel_num = 0U, + }; +#endif //defined (CY_USING_HAL) +static const cy_stc_pll_manual_config_t srss_0_clock_0_pll_0_pllConfig = +{ + .feedbackDiv = 30, + .referenceDiv = 1, + .outputDiv = 5, + .lfMode = false, + .outputMode = CY_SYSCLK_FLLPLL_OUTPUT_AUTO, +}; + +__WEAK void cycfg_ClockStartupError(uint32_t error) +{ + (void)error; /* Suppress the compiler warning */ + while(1); +} +__STATIC_INLINE void Cy_SysClk_ClkAltSysTickInit() +{ + Cy_SysTick_SetClockSource(CY_SYSTICK_CLOCK_SOURCE_CLK_LF); +} +__STATIC_INLINE void Cy_SysClk_ClkBakInit() +{ + Cy_SysClk_ClkBakSetSource(CY_SYSCLK_BAK_IN_WCO); +} +__STATIC_INLINE void Cy_SysClk_ClkFastInit() +{ + Cy_SysClk_ClkFastSetDivider(0U); +} +__STATIC_INLINE void Cy_SysClk_FllInit() +{ + if (CY_SYSCLK_SUCCESS != Cy_SysClk_FllManualConfigure(&srss_0_clock_0_fll_0_fllConfig)) + { + cycfg_ClockStartupError(CY_CFG_SYSCLK_FLL_ERROR); + } + if (CY_SYSCLK_SUCCESS != Cy_SysClk_FllEnable(200000UL)) + { + cycfg_ClockStartupError(CY_CFG_SYSCLK_FLL_ERROR); + } +} +__STATIC_INLINE void Cy_SysClk_ClkHf0Init() +{ + Cy_SysClk_ClkHfSetSource(0U, CY_CFG_SYSCLK_CLKHF0_CLKPATH); + Cy_SysClk_ClkHfSetDivider(0U, CY_SYSCLK_CLKHF_NO_DIVIDE); +} +__STATIC_INLINE void Cy_SysClk_ClkHf2Init() +{ + Cy_SysClk_ClkHfSetSource(CY_CFG_SYSCLK_CLKHF2, CY_CFG_SYSCLK_CLKHF2_CLKPATH); + Cy_SysClk_ClkHfSetDivider(CY_CFG_SYSCLK_CLKHF2, CY_SYSCLK_CLKHF_DIVIDE_BY_2); + Cy_SysClk_ClkHfEnable(CY_CFG_SYSCLK_CLKHF2); +} +__STATIC_INLINE void Cy_SysClk_ClkHf3Init() +{ + Cy_SysClk_ClkHfSetSource(CY_CFG_SYSCLK_CLKHF3, CY_CFG_SYSCLK_CLKHF3_CLKPATH); + Cy_SysClk_ClkHfSetDivider(CY_CFG_SYSCLK_CLKHF3, CY_SYSCLK_CLKHF_NO_DIVIDE); + Cy_SysClk_ClkHfEnable(CY_CFG_SYSCLK_CLKHF3); +} +__STATIC_INLINE void Cy_SysClk_IloInit() +{ + /* The WDT is unlocked in the default startup code */ + Cy_SysClk_IloEnable(); + Cy_SysClk_IloHibernateOn(true); +} +__STATIC_INLINE void Cy_SysClk_ClkLfInit() +{ + /* The WDT is unlocked in the default startup code */ + Cy_SysClk_ClkLfSetSource(CY_SYSCLK_CLKLF_IN_WCO); +} +__STATIC_INLINE void Cy_SysClk_ClkPath0Init() +{ + Cy_SysClk_ClkPathSetSource(0U, CY_CFG_SYSCLK_CLKPATH0_SOURCE); +} +__STATIC_INLINE void Cy_SysClk_ClkPath1Init() +{ + Cy_SysClk_ClkPathSetSource(1U, CY_CFG_SYSCLK_CLKPATH1_SOURCE); +} +__STATIC_INLINE void Cy_SysClk_ClkPath2Init() +{ + Cy_SysClk_ClkPathSetSource(2U, CY_CFG_SYSCLK_CLKPATH2_SOURCE); +} +__STATIC_INLINE void Cy_SysClk_ClkPath3Init() +{ + Cy_SysClk_ClkPathSetSource(3U, CY_CFG_SYSCLK_CLKPATH3_SOURCE); +} +__STATIC_INLINE void Cy_SysClk_ClkPath4Init() +{ + Cy_SysClk_ClkPathSetSource(4U, CY_CFG_SYSCLK_CLKPATH4_SOURCE); +} +__STATIC_INLINE void Cy_SysClk_ClkPeriInit() +{ + Cy_SysClk_ClkPeriSetDivider(0U); +} +__STATIC_INLINE void Cy_SysClk_Pll0Init() +{ + if (CY_SYSCLK_SUCCESS != Cy_SysClk_PllManualConfigure(1U, &srss_0_clock_0_pll_0_pllConfig)) + { + cycfg_ClockStartupError(CY_CFG_SYSCLK_PLL_ERROR); + } + if (CY_SYSCLK_SUCCESS != Cy_SysClk_PllEnable(1U, 10000u)) + { + cycfg_ClockStartupError(CY_CFG_SYSCLK_PLL_ERROR); + } +} +__STATIC_INLINE void Cy_SysClk_ClkSlowInit() +{ + Cy_SysClk_ClkSlowSetDivider(0U); +} +__STATIC_INLINE void Cy_SysClk_ClkTimerInit() +{ + Cy_SysClk_ClkTimerDisable(); + Cy_SysClk_ClkTimerSetSource(CY_SYSCLK_CLKTIMER_IN_IMO); + Cy_SysClk_ClkTimerSetDivider(0U); + Cy_SysClk_ClkTimerEnable(); +} +__STATIC_INLINE void Cy_SysClk_WcoInit() +{ + (void)Cy_GPIO_Pin_FastInit(GPIO_PRT0, 0U, 0x00U, 0x00U, HSIOM_SEL_GPIO); + (void)Cy_GPIO_Pin_FastInit(GPIO_PRT0, 1U, 0x00U, 0x00U, HSIOM_SEL_GPIO); + if (CY_SYSCLK_SUCCESS != Cy_SysClk_WcoEnable(1000000UL)) + { + cycfg_ClockStartupError(CY_CFG_SYSCLK_WCO_ERROR); + } +} +__STATIC_INLINE void init_cycfg_power(void) +{ + /* Reset the Backup domain on POR, XRES, BOD only if Backup domain is supplied by VDDD */ + #if (CY_CFG_PWR_VBACKUP_USING_VDDD) + if (0u == Cy_SysLib_GetResetReason() /* POR, XRES, or BOD */) + { + Cy_SysLib_ResetBackupDomain(); + Cy_SysClk_IloDisable(); + Cy_SysClk_IloInit(); + } + #else /* Dedicated Supply */ + Cy_SysPm_BackupSetSupply(CY_SYSPM_VDDBACKUP_VBACKUP); + #endif /* CY_CFG_PWR_VBACKUP_USING_VDDD */ + + /* Configure core regulator */ + #if CY_CFG_PWR_USING_LDO + Cy_SysPm_LdoSetVoltage(CY_SYSPM_LDO_VOLTAGE_LP); + Cy_SysPm_LdoSetMode(CY_SYSPM_LDO_MODE_NORMAL); + #else + Cy_SysPm_BuckEnable(CY_SYSPM_BUCK_OUT1_VOLTAGE_LP); + #endif /* CY_CFG_PWR_USING_LDO */ + /* Configure PMIC */ + Cy_SysPm_UnlockPmic(); + #if CY_CFG_PWR_USING_PMIC + Cy_SysPm_PmicEnableOutput(); + #else + Cy_SysPm_PmicDisableOutput(); + #endif /* CY_CFG_PWR_USING_PMIC */ +} + + +void init_cycfg_system(void) +{ + /* Set worst case memory wait states (! ultra low power, 150 MHz), will update at the end */ + Cy_SysLib_SetWaitStates(false, 150UL); + #ifdef CY_CFG_PWR_ENABLED + #ifdef CY_CFG_PWR_INIT + init_cycfg_power(); + #else + #warning Power system will not be configured. Update power personality to v1.20 or later. + #endif /* CY_CFG_PWR_INIT */ + #endif /* CY_CFG_PWR_ENABLED */ + + /* Reset the core clock path to default and disable all the FLLs/PLLs */ + Cy_SysClk_ClkHfSetDivider(0U, CY_SYSCLK_CLKHF_NO_DIVIDE); + Cy_SysClk_ClkFastSetDivider(0U); + Cy_SysClk_ClkPeriSetDivider(1U); + Cy_SysClk_ClkSlowSetDivider(0U); + for (uint32_t pll = CY_SRSS_NUM_PLL; pll > 0UL; --pll) /* PLL 1 is the first PLL. 0 is invalid. */ + { + (void)Cy_SysClk_PllDisable(pll); + } + Cy_SysClk_ClkPathSetSource(CY_SYSCLK_CLKHF_IN_CLKPATH1, CY_SYSCLK_CLKPATH_IN_IMO); + + if ((CY_SYSCLK_CLKHF_IN_CLKPATH0 == Cy_SysClk_ClkHfGetSource(0UL)) && + (CY_SYSCLK_CLKPATH_IN_WCO == Cy_SysClk_ClkPathGetSource(CY_SYSCLK_CLKHF_IN_CLKPATH0))) + { + Cy_SysClk_ClkHfSetSource(0U, CY_SYSCLK_CLKHF_IN_CLKPATH1); + } + + Cy_SysClk_FllDisable(); + Cy_SysClk_ClkPathSetSource(CY_SYSCLK_CLKHF_IN_CLKPATH0, CY_SYSCLK_CLKPATH_IN_IMO); + Cy_SysClk_ClkHfSetSource(0UL, CY_SYSCLK_CLKHF_IN_CLKPATH0); + #ifdef CY_IP_MXBLESS + (void)Cy_BLE_EcoReset(); + #endif + + + /* Enable all source clocks */ + #ifdef CY_CFG_SYSCLK_PILO_ENABLED + Cy_SysClk_PiloInit(); + #endif + + #ifdef CY_CFG_SYSCLK_WCO_ENABLED + Cy_SysClk_WcoInit(); + #endif + + #ifdef CY_CFG_SYSCLK_CLKLF_ENABLED + Cy_SysClk_ClkLfInit(); + #endif + + #ifdef CY_CFG_SYSCLK_ALTHF_ENABLED + Cy_SysClk_AltHfInit(); + #endif + + #ifdef CY_CFG_SYSCLK_ECO_ENABLED + Cy_SysClk_EcoInit(); + #endif + + #ifdef CY_CFG_SYSCLK_EXTCLK_ENABLED + Cy_SysClk_ExtClkInit(); + #endif + + /* Configure CPU clock dividers */ + #ifdef CY_CFG_SYSCLK_CLKFAST_ENABLED + Cy_SysClk_ClkFastInit(); + #endif + + #ifdef CY_CFG_SYSCLK_CLKPERI_ENABLED + Cy_SysClk_ClkPeriInit(); + #endif + + #ifdef CY_CFG_SYSCLK_CLKSLOW_ENABLED + Cy_SysClk_ClkSlowInit(); + #endif + + #if ((CY_CFG_SYSCLK_CLKPATH0_SOURCE == CY_SYSCLK_CLKPATH_IN_WCO) && (CY_CFG_SYSCLK_CLKHF0_CLKPATH == CY_SYSCLK_CLKHF_IN_CLKPATH0)) + /* Configure HFCLK0 to temporarily run from IMO to initialize other clocks */ + Cy_SysClk_ClkPathSetSource(1UL, CY_SYSCLK_CLKPATH_IN_IMO); + Cy_SysClk_ClkHfSetSource(0UL, CY_SYSCLK_CLKHF_IN_CLKPATH1); + #else + #ifdef CY_CFG_SYSCLK_CLKPATH1_ENABLED + Cy_SysClk_ClkPath1Init(); + #endif + #endif + + /* Configure Path Clocks */ + #ifdef CY_CFG_SYSCLK_CLKPATH0_ENABLED + Cy_SysClk_ClkPath0Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKPATH2_ENABLED + Cy_SysClk_ClkPath2Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKPATH3_ENABLED + Cy_SysClk_ClkPath3Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKPATH4_ENABLED + Cy_SysClk_ClkPath4Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKPATH5_ENABLED + Cy_SysClk_ClkPath5Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKPATH6_ENABLED + Cy_SysClk_ClkPath6Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKPATH7_ENABLED + Cy_SysClk_ClkPath7Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKPATH8_ENABLED + Cy_SysClk_ClkPath8Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKPATH9_ENABLED + Cy_SysClk_ClkPath9Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKPATH10_ENABLED + Cy_SysClk_ClkPath10Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKPATH11_ENABLED + Cy_SysClk_ClkPath11Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKPATH12_ENABLED + Cy_SysClk_ClkPath12Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKPATH13_ENABLED + Cy_SysClk_ClkPath13Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKPATH14_ENABLED + Cy_SysClk_ClkPath14Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKPATH15_ENABLED + Cy_SysClk_ClkPath15Init(); + #endif + + /* Configure and enable FLL */ + #ifdef CY_CFG_SYSCLK_FLL_ENABLED + Cy_SysClk_FllInit(); + #endif + + Cy_SysClk_ClkHf0Init(); + + #if ((CY_CFG_SYSCLK_CLKPATH0_SOURCE == CY_SYSCLK_CLKPATH_IN_WCO) && (CY_CFG_SYSCLK_CLKHF0_CLKPATH == CY_SYSCLK_CLKHF_IN_CLKPATH0)) + #ifdef CY_CFG_SYSCLK_CLKPATH1_ENABLED + /* Apply the ClkPath1 user setting */ + Cy_SysClk_ClkPath1Init(); + #endif + #endif + + /* Configure and enable PLLs */ + #ifdef CY_CFG_SYSCLK_PLL0_ENABLED + Cy_SysClk_Pll0Init(); + #endif + #ifdef CY_CFG_SYSCLK_PLL1_ENABLED + Cy_SysClk_Pll1Init(); + #endif + #ifdef CY_CFG_SYSCLK_PLL2_ENABLED + Cy_SysClk_Pll2Init(); + #endif + #ifdef CY_CFG_SYSCLK_PLL3_ENABLED + Cy_SysClk_Pll3Init(); + #endif + #ifdef CY_CFG_SYSCLK_PLL4_ENABLED + Cy_SysClk_Pll4Init(); + #endif + #ifdef CY_CFG_SYSCLK_PLL5_ENABLED + Cy_SysClk_Pll5Init(); + #endif + #ifdef CY_CFG_SYSCLK_PLL6_ENABLED + Cy_SysClk_Pll6Init(); + #endif + #ifdef CY_CFG_SYSCLK_PLL7_ENABLED + Cy_SysClk_Pll7Init(); + #endif + #ifdef CY_CFG_SYSCLK_PLL8_ENABLED + Cy_SysClk_Pll8Init(); + #endif + #ifdef CY_CFG_SYSCLK_PLL9_ENABLED + Cy_SysClk_Pll9Init(); + #endif + #ifdef CY_CFG_SYSCLK_PLL10_ENABLED + Cy_SysClk_Pll10Init(); + #endif + #ifdef CY_CFG_SYSCLK_PLL11_ENABLED + Cy_SysClk_Pll11Init(); + #endif + #ifdef CY_CFG_SYSCLK_PLL12_ENABLED + Cy_SysClk_Pll12Init(); + #endif + #ifdef CY_CFG_SYSCLK_PLL13_ENABLED + Cy_SysClk_Pll13Init(); + #endif + #ifdef CY_CFG_SYSCLK_PLL14_ENABLED + Cy_SysClk_Pll14Init(); + #endif + + /* Configure HF clocks */ + #ifdef CY_CFG_SYSCLK_CLKHF1_ENABLED + Cy_SysClk_ClkHf1Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKHF2_ENABLED + Cy_SysClk_ClkHf2Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKHF3_ENABLED + Cy_SysClk_ClkHf3Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKHF4_ENABLED + Cy_SysClk_ClkHf4Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKHF5_ENABLED + Cy_SysClk_ClkHf5Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKHF6_ENABLED + Cy_SysClk_ClkHf6Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKHF7_ENABLED + Cy_SysClk_ClkHf7Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKHF8_ENABLED + Cy_SysClk_ClkHf8Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKHF9_ENABLED + Cy_SysClk_ClkHf9Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKHF10_ENABLED + Cy_SysClk_ClkHf10Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKHF11_ENABLED + Cy_SysClk_ClkHf11Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKHF12_ENABLED + Cy_SysClk_ClkHf12Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKHF13_ENABLED + Cy_SysClk_ClkHf13Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKHF14_ENABLED + Cy_SysClk_ClkHf14Init(); + #endif + #ifdef CY_CFG_SYSCLK_CLKHF15_ENABLED + Cy_SysClk_ClkHf15Init(); + #endif + + /* Configure miscellaneous clocks */ + #ifdef CY_CFG_SYSCLK_CLKTIMER_ENABLED + Cy_SysClk_ClkTimerInit(); + #endif + + #ifdef CY_CFG_SYSCLK_CLKALTSYSTICK_ENABLED + Cy_SysClk_ClkAltSysTickInit(); + #endif + + #ifdef CY_CFG_SYSCLK_CLKPUMP_ENABLED + Cy_SysClk_ClkPumpInit(); + #endif + + #ifdef CY_CFG_SYSCLK_CLKBAK_ENABLED + Cy_SysClk_ClkBakInit(); + #endif + + /* Configure default enabled clocks */ + #ifdef CY_CFG_SYSCLK_ILO_ENABLED + Cy_SysClk_IloInit(); + #else + Cy_SysClk_IloDisable(); + #endif + + #ifndef CY_CFG_SYSCLK_IMO_ENABLED + #error the IMO must be enabled for proper chip operation + #endif + + #ifdef CY_CFG_SYSCLK_MFO_ENABLED + Cy_SysClk_MfoInit(); + #endif + + #ifdef CY_CFG_SYSCLK_CLKMF_ENABLED + Cy_SysClk_ClkMfInit(); + #endif + + /* Set accurate flash wait states */ + #if (defined (CY_CFG_PWR_ENABLED) && defined (CY_CFG_SYSCLK_CLKHF0_ENABLED)) + Cy_SysLib_SetWaitStates(CY_CFG_PWR_USING_ULP != 0, CY_CFG_SYSCLK_CLKHF0_FREQ_MHZ); + #endif + + /* Update System Core Clock values for correct Cy_SysLib_Delay functioning */ + SystemCoreClockUpdate(); + +#if defined (CY_USING_HAL) + cyhal_hwmgr_reserve(&srss_0_clock_0_pathmux_0_obj); +#endif //defined (CY_USING_HAL) + +#if defined (CY_USING_HAL) + cyhal_hwmgr_reserve(&srss_0_clock_0_pathmux_1_obj); +#endif //defined (CY_USING_HAL) + +#if defined (CY_USING_HAL) + cyhal_hwmgr_reserve(&srss_0_clock_0_pathmux_2_obj); +#endif //defined (CY_USING_HAL) + +#if defined (CY_USING_HAL) + cyhal_hwmgr_reserve(&srss_0_clock_0_pathmux_3_obj); +#endif //defined (CY_USING_HAL) + +#if defined (CY_USING_HAL) + cyhal_hwmgr_reserve(&srss_0_clock_0_pathmux_4_obj); +#endif //defined (CY_USING_HAL) +} diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_system.h b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_system.h new file mode 100644 index 00000000000..372336c3429 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_system.h @@ -0,0 +1,109 @@ +/******************************************************************************* +* File Name: cycfg_system.h +* +* Description: +* System configuration +* This file was automatically generated and should not be modified. +* cfg-backend-cli: 1.2.0.1478 +* Device Support Library (../../../../output/psoc6/psoc6pdl): 1.4.0.1571 +* +******************************************************************************** +* Copyright 2017-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +********************************************************************************/ + +#if !defined(CYCFG_SYSTEM_H) +#define CYCFG_SYSTEM_H + +#include "cycfg_notices.h" +#include "cy_sysclk.h" +#include "cy_systick.h" +#if defined (CY_USING_HAL) + #include "cyhal_hwmgr.h" +#endif //defined (CY_USING_HAL) +#include "cy_gpio.h" +#include "cy_syspm.h" + +#if defined(__cplusplus) +extern "C" { +#endif + +#define cpuss_0_dap_0_ENABLED 1U +#define srss_0_clock_0_ENABLED 1U +#define srss_0_clock_0_altsystickclk_0_ENABLED 1U +#define srss_0_clock_0_bakclk_0_ENABLED 1U +#define srss_0_clock_0_fastclk_0_ENABLED 1U +#define srss_0_clock_0_fll_0_ENABLED 1U +#define srss_0_clock_0_hfclk_0_ENABLED 1U +#define CY_CFG_SYSCLK_CLKHF0 0UL +#define srss_0_clock_0_hfclk_2_ENABLED 1U +#define CY_CFG_SYSCLK_CLKHF2 2UL +#define srss_0_clock_0_hfclk_3_ENABLED 1U +#define CY_CFG_SYSCLK_CLKHF3 3UL +#define srss_0_clock_0_ilo_0_ENABLED 1U +#define srss_0_clock_0_imo_0_ENABLED 1U +#define srss_0_clock_0_lfclk_0_ENABLED 1U +#define CY_CFG_SYSCLK_CLKLF_FREQ_HZ 32768 +#define srss_0_clock_0_pathmux_0_ENABLED 1U +#define srss_0_clock_0_pathmux_1_ENABLED 1U +#define srss_0_clock_0_pathmux_2_ENABLED 1U +#define srss_0_clock_0_pathmux_3_ENABLED 1U +#define srss_0_clock_0_pathmux_4_ENABLED 1U +#define srss_0_clock_0_periclk_0_ENABLED 1U +#define srss_0_clock_0_pll_0_ENABLED 1U +#define srss_0_clock_0_slowclk_0_ENABLED 1U +#define srss_0_clock_0_timerclk_0_ENABLED 1U +#define srss_0_clock_0_wco_0_ENABLED 1U +#define srss_0_power_0_ENABLED 1U +#define CY_CFG_PWR_MODE_LP 0x01UL +#define CY_CFG_PWR_MODE_ULP 0x02UL +#define CY_CFG_PWR_MODE_ACTIVE 0x04UL +#define CY_CFG_PWR_MODE_SLEEP 0x08UL +#define CY_CFG_PWR_MODE_DEEPSLEEP 0x10UL +#define CY_CFG_PWR_SYS_IDLE_MODE CY_CFG_PWR_MODE_DEEPSLEEP +#define CY_CFG_PWR_SYS_ACTIVE_MODE CY_CFG_PWR_MODE_LP +#define CY_CFG_PWR_DEEPSLEEP_LATENCY 0UL +#define CY_CFG_PWR_USING_LDO 1 +#define CY_CFG_PWR_VDDA_MV 3300 +#define CY_CFG_PWR_VDDD_MV 3300 +#define CY_CFG_PWR_VBACKUP_MV 3300 +#define CY_CFG_PWR_VDD_NS_MV 3300 +#define CY_CFG_PWR_VDDIO0_MV 3300 +#define CY_CFG_PWR_VDDIO1_MV 3300 + +#if defined (CY_USING_HAL) + extern const cyhal_resource_inst_t srss_0_clock_0_pathmux_0_obj; +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + extern const cyhal_resource_inst_t srss_0_clock_0_pathmux_1_obj; +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + extern const cyhal_resource_inst_t srss_0_clock_0_pathmux_2_obj; +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + extern const cyhal_resource_inst_t srss_0_clock_0_pathmux_3_obj; +#endif //defined (CY_USING_HAL) +#if defined (CY_USING_HAL) + extern const cyhal_resource_inst_t srss_0_clock_0_pathmux_4_obj; +#endif //defined (CY_USING_HAL) + +void init_cycfg_system(void); + +#if defined(__cplusplus) +} +#endif + + +#endif /* CYCFG_SYSTEM_H */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/qspi_config.cfg b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/qspi_config.cfg new file mode 100644 index 00000000000..909b041e9fd --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/qspi_config.cfg @@ -0,0 +1,3 @@ +set SMIF_BANKS { + 0 {addr 0x18000000 size 0x4000000 psize 0x00000200 esize 0x00040000} +} diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/cyreservedresources.list b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/cyreservedresources.list index cb2d9cd651c..a8490a965d3 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/cyreservedresources.list +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/cyreservedresources.list @@ -1,48 +1,42 @@ -[Device="CY8C6247BZI-D54"] +[Device=CY8C6247BZI-D54] [Blocks] -# User IO -# CYBSP_USER_LED1 -ioss[0].port[11].pin[1] -# CYBSP_USER_LED2 -ioss[0].port[1].pin[5] -# CYBSP_USER_LED3 -ioss[0].port[1].pin[1] -# CYBSP_USER_LED4 -ioss[0].port[0].pin[5] -# CYBSP_USER_LED5 -ioss[0].port[7].pin[3] -# CYBSP_USER_BTN1 -ioss[0].port[0].pin[4] -# CYBSP_USER_BTN2 -ioss[0].port[1].pin[4] - -# Debug -# CYBSP_DEBUG_UART -scb[5] -# CYBSP_DEBUG_UART_RX -ioss[0].port[5].pin[0] -# CYBSP_DEBUG_UART_TX -ioss[0].port[5].pin[1] -# CYBSP_DEBUG_UART_RTS -ioss[0].port[5].pin[2] -# CYBSP_DEBUG_UART_CTS -ioss[0].port[5].pin[3] - # WIFI # CYBSP_WIFI_SDIO udb[0] -# CYBSP_WIFI_SDIO_DAT0 +peri[0].div_8[0] +cpuss[0].dw0[0].chan[0] +cpuss[0].dw0[0].chan[1] +cpuss[0].dw1[0].chan[1] +cpuss[0].dw1[0].chan[3] +# CYBSP_WIFI_SDIO_D0 ioss[0].port[2].pin[0] -# CYBSP_WIFI_SDIO_DAT1 +# CYBSP_WIFI_SDIO_D1 ioss[0].port[2].pin[1] -# CYBSP_WIFI_SDIO_DAT2 +# CYBSP_WIFI_SDIO_D2 ioss[0].port[2].pin[2] -# CYBSP_WIFI_SDIO_DAT3 +# CYBSP_WIFI_SDIO_D3 ioss[0].port[2].pin[3] # CYBSP_WIFI_SDIO_CMD ioss[0].port[2].pin[4] # CYBSP_WIFI_SDIO_CLK ioss[0].port[2].pin[5] # CYBSP_WIFI_WL_REG_ON -ioss[0].port[2].pin[6] \ No newline at end of file +ioss[0].port[2].pin[6] + +[RoutingResources] +# CYBSP_WIFI_SDIO +cpuss[0].dw0_tr_in[0] +cpuss[0].dw0_tr_in[1] +cpuss[0].dw1_tr_in[1] +cpuss[0].dw1_tr_in[3] + +udb[0].tr_udb[0] +udb[0].tr_udb[1] +udb[0].tr_udb[3] +udb[0].tr_udb[7] + +tr_group[0].input[43] +tr_group[0].input[44] +tr_group[0].input[47] +tr_group[0].input[48] \ No newline at end of file diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/design.cycapsense b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/design.cycapsense new file mode 100644 index 00000000000..c90a8a3b8dc --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/design.cycapsense @@ -0,0 +1,402 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/design.cyqspi b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/design.cyqspi new file mode 100644 index 00000000000..0491776b02f --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/design.cyqspi @@ -0,0 +1,63 @@ + + + + PSoC 6.xml + + + 0 + S25FL512S-4byteaddr + true + None + 0x18000000 + 0x4000000 + 0x1BFFFFFF + true + false + QUAD_SPI_DATA_0_3 + S25FL512S-4byteaddr + true + + + 1 + Not used + false + None + 0x0 + 0x0 + + false + false + SPI_MOSI_MISO_DATA_0_1 + default_memory.xml + false + + + 2 + Not used + false + None + 0x0 + 0x0 + + false + false + SPI_MOSI_MISO_DATA_0_1 + default_memory.xml + false + + + 3 + Not used + false + None + 0x0 + 0x0 + + false + false + SPI_MOSI_MISO_DATA_0_1 + default_memory.xml + false + + + diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/design.modus b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/design.modus new file mode 100644 index 00000000000..57df770d929 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/COMPONENT_BSP_DESIGN_MODUS/design.modus @@ -0,0 +1,501 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/PeripheralPins.c b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/PeripheralPins.c new file mode 100644 index 00000000000..433e728ea3c --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/PeripheralPins.c @@ -0,0 +1,474 @@ +/* + * mbed Microcontroller Library + * Copyright (c) 2017-2018 Future Electronics + * Copyright (c) 2019 Cypress Semiconductor Corporation + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "PeripheralNames.h" +#include "PeripheralPins.h" +#include "pinmap.h" + +#if DEVICE_SERIAL +//*** SERIAL *** +const PinMap PinMap_UART_RX[] = { + {P0_2, UART_0, CYHAL_PIN_IN_FUNCTION(P0_2_SCB0_UART_RX)}, + {P1_0, UART_7, CYHAL_PIN_IN_FUNCTION(P1_0_SCB7_UART_RX)}, + {P2_0, UART_1, CYHAL_PIN_IN_FUNCTION(P2_0_SCB1_UART_RX)}, + {P3_0, UART_2, CYHAL_PIN_IN_FUNCTION(P3_0_SCB2_UART_RX)}, + {P4_0, UART_7, CYHAL_PIN_IN_FUNCTION(P4_0_SCB7_UART_RX)}, + {P5_0, UART_5, CYHAL_PIN_IN_FUNCTION(P5_0_SCB5_UART_RX)}, + {P6_0, UART_3, CYHAL_PIN_IN_FUNCTION(P6_0_SCB3_UART_RX)}, + {P6_4, UART_6, CYHAL_PIN_IN_FUNCTION(P6_4_SCB6_UART_RX)}, + {P7_0, UART_4, CYHAL_PIN_IN_FUNCTION(P7_0_SCB4_UART_RX)}, + {P8_0, UART_4, CYHAL_PIN_IN_FUNCTION(P8_0_SCB4_UART_RX)}, + {P9_0, UART_2, CYHAL_PIN_IN_FUNCTION(P9_0_SCB2_UART_RX)}, + {P10_0, UART_1, CYHAL_PIN_IN_FUNCTION(P10_0_SCB1_UART_RX)}, + {P11_0, UART_5, CYHAL_PIN_IN_FUNCTION(P11_0_SCB5_UART_RX)}, + {P12_0, UART_6, CYHAL_PIN_IN_FUNCTION(P12_0_SCB6_UART_RX)}, + {P13_0, UART_6, CYHAL_PIN_IN_FUNCTION(P13_0_SCB6_UART_RX)}, + {NC, NC, 0} +}; +const PinMap PinMap_UART_TX[] = { + {P0_3, UART_0, CYHAL_PIN_OUT_FUNCTION(P0_3_SCB0_UART_TX)}, + {P1_1, UART_7, CYHAL_PIN_OUT_FUNCTION(P1_1_SCB7_UART_TX)}, + {P2_1, UART_1, CYHAL_PIN_OUT_FUNCTION(P2_1_SCB1_UART_TX)}, + {P3_1, UART_2, CYHAL_PIN_OUT_FUNCTION(P3_1_SCB2_UART_TX)}, + {P4_1, UART_7, CYHAL_PIN_OUT_FUNCTION(P4_1_SCB7_UART_TX)}, + {P5_1, UART_5, CYHAL_PIN_OUT_FUNCTION(P5_1_SCB5_UART_TX)}, + {P6_1, UART_3, CYHAL_PIN_OUT_FUNCTION(P6_1_SCB3_UART_TX)}, + {P6_5, UART_6, CYHAL_PIN_OUT_FUNCTION(P6_5_SCB6_UART_TX)}, + {P7_1, UART_4, CYHAL_PIN_OUT_FUNCTION(P7_1_SCB4_UART_TX)}, + {P8_1, UART_4, CYHAL_PIN_OUT_FUNCTION(P8_1_SCB4_UART_TX)}, + {P9_1, UART_2, CYHAL_PIN_OUT_FUNCTION(P9_1_SCB2_UART_TX)}, + {P10_1, UART_1, CYHAL_PIN_OUT_FUNCTION(P10_1_SCB1_UART_TX)}, + {P11_1, UART_5, CYHAL_PIN_OUT_FUNCTION(P11_1_SCB5_UART_TX)}, + {P12_1, UART_6, CYHAL_PIN_OUT_FUNCTION(P12_1_SCB6_UART_TX)}, + {P13_1, UART_6, CYHAL_PIN_OUT_FUNCTION(P13_1_SCB6_UART_TX)}, + {NC, NC, 0} +}; +const PinMap PinMap_UART_RTS[] = { + {P0_4, UART_0, CYHAL_PIN_OUT_FUNCTION(P0_4_SCB0_UART_RTS)}, + {P1_2, UART_7, CYHAL_PIN_OUT_FUNCTION(P1_2_SCB7_UART_RTS)}, + {P2_2, UART_1, CYHAL_PIN_OUT_FUNCTION(P2_2_SCB1_UART_RTS)}, + {P3_2, UART_2, CYHAL_PIN_OUT_FUNCTION(P3_2_SCB2_UART_RTS)}, + {P5_2, UART_5, CYHAL_PIN_OUT_FUNCTION(P5_2_SCB5_UART_RTS)}, + {P6_2, UART_3, CYHAL_PIN_OUT_FUNCTION(P6_2_SCB3_UART_RTS)}, + {P6_6, UART_6, CYHAL_PIN_OUT_FUNCTION(P6_6_SCB6_UART_RTS)}, + {P7_2, UART_4, CYHAL_PIN_OUT_FUNCTION(P7_2_SCB4_UART_RTS)}, + {P8_2, UART_4, CYHAL_PIN_OUT_FUNCTION(P8_2_SCB4_UART_RTS)}, + {P9_2, UART_2, CYHAL_PIN_OUT_FUNCTION(P9_2_SCB2_UART_RTS)}, + {P10_2, UART_1, CYHAL_PIN_OUT_FUNCTION(P10_2_SCB1_UART_RTS)}, + {P11_2, UART_5, CYHAL_PIN_OUT_FUNCTION(P11_2_SCB5_UART_RTS)}, + {P12_2, UART_6, CYHAL_PIN_OUT_FUNCTION(P12_2_SCB6_UART_RTS)}, + {NC, NC, 0} +}; +const PinMap PinMap_UART_CTS[] = { + {P0_5, UART_0, CYHAL_PIN_IN_FUNCTION(P0_5_SCB0_UART_CTS)}, + {P1_3, UART_7, CYHAL_PIN_IN_FUNCTION(P1_3_SCB7_UART_CTS)}, + {P2_3, UART_1, CYHAL_PIN_IN_FUNCTION(P2_3_SCB1_UART_CTS)}, + {P3_3, UART_2, CYHAL_PIN_IN_FUNCTION(P3_3_SCB2_UART_CTS)}, + {P5_3, UART_5, CYHAL_PIN_IN_FUNCTION(P5_3_SCB5_UART_CTS)}, + {P6_3, UART_3, CYHAL_PIN_IN_FUNCTION(P6_3_SCB3_UART_CTS)}, + {P6_7, UART_6, CYHAL_PIN_IN_FUNCTION(P6_7_SCB6_UART_CTS)}, + {P7_3, UART_4, CYHAL_PIN_IN_FUNCTION(P7_3_SCB4_UART_CTS)}, + {P8_3, UART_4, CYHAL_PIN_IN_FUNCTION(P8_3_SCB4_UART_CTS)}, + {P9_3, UART_2, CYHAL_PIN_IN_FUNCTION(P9_3_SCB2_UART_CTS)}, + {P10_3, UART_1, CYHAL_PIN_IN_FUNCTION(P10_3_SCB1_UART_CTS)}, + {P11_3, UART_5, CYHAL_PIN_IN_FUNCTION(P11_3_SCB5_UART_CTS)}, + {P12_3, UART_6, CYHAL_PIN_IN_FUNCTION(P12_3_SCB6_UART_CTS)}, + {NC, NC, 0} +}; +#endif // DEVICE_SERIAL + + +#if DEVICE_I2C +//*** I2C *** +const PinMap PinMap_I2C_SCL[] = { + {P0_2, I2C_0, CYHAL_PIN_OD_FUNCTION(P0_2_SCB0_I2C_SCL)}, + {P1_0, I2C_7, CYHAL_PIN_OD_FUNCTION(P1_0_SCB7_I2C_SCL)}, + {P2_0, I2C_1, CYHAL_PIN_OD_FUNCTION(P2_0_SCB1_I2C_SCL)}, + {P3_0, I2C_2, CYHAL_PIN_OD_FUNCTION(P3_0_SCB2_I2C_SCL)}, + {P4_0, I2C_7, CYHAL_PIN_OD_FUNCTION(P4_0_SCB7_I2C_SCL)}, + {P5_0, I2C_5, CYHAL_PIN_OD_FUNCTION(P5_0_SCB5_I2C_SCL)}, + {P6_0, I2C_3, CYHAL_PIN_OD_FUNCTION(P6_0_SCB3_I2C_SCL)}, + {P6_0, I2C_8, CYHAL_PIN_OD_FUNCTION(P6_0_SCB8_I2C_SCL)}, + {P6_4, I2C_6, CYHAL_PIN_OD_FUNCTION(P6_4_SCB6_I2C_SCL)}, + {P6_4, I2C_8, CYHAL_PIN_OD_FUNCTION(P6_4_SCB8_I2C_SCL)}, + {P7_0, I2C_4, CYHAL_PIN_OD_FUNCTION(P7_0_SCB4_I2C_SCL)}, + {P8_0, I2C_4, CYHAL_PIN_OD_FUNCTION(P8_0_SCB4_I2C_SCL)}, + {P9_0, I2C_2, CYHAL_PIN_OD_FUNCTION(P9_0_SCB2_I2C_SCL)}, + {P10_0, I2C_1, CYHAL_PIN_OD_FUNCTION(P10_0_SCB1_I2C_SCL)}, + {P11_0, I2C_5, CYHAL_PIN_OD_FUNCTION(P11_0_SCB5_I2C_SCL)}, + {P12_0, I2C_6, CYHAL_PIN_OD_FUNCTION(P12_0_SCB6_I2C_SCL)}, + {P13_0, I2C_6, CYHAL_PIN_OD_FUNCTION(P13_0_SCB6_I2C_SCL)}, + {NC, NC, 0} +}; +const PinMap PinMap_I2C_SDA[] = { + {P0_3, I2C_0, CYHAL_PIN_OD_FUNCTION(P0_3_SCB0_I2C_SDA)}, + {P1_1, I2C_7, CYHAL_PIN_OD_FUNCTION(P1_1_SCB7_I2C_SDA)}, + {P2_1, I2C_1, CYHAL_PIN_OD_FUNCTION(P2_1_SCB1_I2C_SDA)}, + {P3_1, I2C_2, CYHAL_PIN_OD_FUNCTION(P3_1_SCB2_I2C_SDA)}, + {P4_1, I2C_7, CYHAL_PIN_OD_FUNCTION(P4_1_SCB7_I2C_SDA)}, + {P5_1, I2C_5, CYHAL_PIN_OD_FUNCTION(P5_1_SCB5_I2C_SDA)}, + {P6_1, I2C_3, CYHAL_PIN_OD_FUNCTION(P6_1_SCB3_I2C_SDA)}, + {P6_1, I2C_8, CYHAL_PIN_OD_FUNCTION(P6_1_SCB8_I2C_SDA)}, + {P6_5, I2C_6, CYHAL_PIN_OD_FUNCTION(P6_5_SCB6_I2C_SDA)}, + {P6_5, I2C_8, CYHAL_PIN_OD_FUNCTION(P6_5_SCB8_I2C_SDA)}, + {P7_1, I2C_4, CYHAL_PIN_OD_FUNCTION(P7_1_SCB4_I2C_SDA)}, + {P8_1, I2C_4, CYHAL_PIN_OD_FUNCTION(P8_1_SCB4_I2C_SDA)}, + {P9_1, I2C_2, CYHAL_PIN_OD_FUNCTION(P9_1_SCB2_I2C_SDA)}, + {P10_1, I2C_1, CYHAL_PIN_OD_FUNCTION(P10_1_SCB1_I2C_SDA)}, + {P11_1, I2C_5, CYHAL_PIN_OD_FUNCTION(P11_1_SCB5_I2C_SDA)}, + {P12_1, I2C_6, CYHAL_PIN_OD_FUNCTION(P12_1_SCB6_I2C_SDA)}, + {P13_1, I2C_6, CYHAL_PIN_OD_FUNCTION(P13_1_SCB6_I2C_SDA)}, + {NC, NC, 0} +}; +#endif // DEVICE_I2C + +#if DEVICE_SPI +//*** SPI *** +const PinMap PinMap_SPI_MOSI[] = { + {P0_2, SPI_0, CYHAL_PIN_OUT_FUNCTION(P0_2_SCB0_SPI_MOSI)}, + {P1_0, SPI_7, CYHAL_PIN_OUT_FUNCTION(P1_0_SCB7_SPI_MOSI)}, + {P2_0, SPI_1, CYHAL_PIN_OUT_FUNCTION(P2_0_SCB1_SPI_MOSI)}, + {P3_0, SPI_2, CYHAL_PIN_OUT_FUNCTION(P3_0_SCB2_SPI_MOSI)}, + {P4_0, SPI_7, CYHAL_PIN_OUT_FUNCTION(P4_0_SCB7_SPI_MOSI)}, + {P5_0, SPI_5, CYHAL_PIN_OUT_FUNCTION(P5_0_SCB5_SPI_MOSI)}, + {P6_0, SPI_3, CYHAL_PIN_OUT_FUNCTION(P6_0_SCB3_SPI_MOSI)}, + {P6_0, SPI_8, CYHAL_PIN_OUT_FUNCTION(P6_0_SCB8_SPI_MOSI)}, + {P6_4, SPI_6, CYHAL_PIN_OUT_FUNCTION(P6_4_SCB6_SPI_MOSI)}, + {P6_4, SPI_8, CYHAL_PIN_OUT_FUNCTION(P6_4_SCB8_SPI_MOSI)}, + {P7_0, SPI_4, CYHAL_PIN_OUT_FUNCTION(P7_0_SCB4_SPI_MOSI)}, + {P8_0, SPI_4, CYHAL_PIN_OUT_FUNCTION(P8_0_SCB4_SPI_MOSI)}, + {P9_0, SPI_2, CYHAL_PIN_OUT_FUNCTION(P9_0_SCB2_SPI_MOSI)}, + {P10_0, SPI_1, CYHAL_PIN_OUT_FUNCTION(P10_0_SCB1_SPI_MOSI)}, + {P11_0, SPI_5, CYHAL_PIN_OUT_FUNCTION(P11_0_SCB5_SPI_MOSI)}, + {P12_0, SPI_6, CYHAL_PIN_OUT_FUNCTION(P12_0_SCB6_SPI_MOSI)}, + {P13_0, SPI_6, CYHAL_PIN_OUT_FUNCTION(P13_0_SCB6_SPI_MOSI)}, + {NC, NC, 0} +}; +const PinMap PinMap_SPI_MISO[] = { + {P0_3, SPI_0, CYHAL_PIN_IN_FUNCTION(P0_3_SCB0_SPI_MISO)}, + {P1_1, SPI_7, CYHAL_PIN_IN_FUNCTION(P1_1_SCB7_SPI_MISO)}, + {P2_1, SPI_1, CYHAL_PIN_IN_FUNCTION(P2_1_SCB1_SPI_MISO)}, + {P3_1, SPI_2, CYHAL_PIN_IN_FUNCTION(P3_1_SCB2_SPI_MISO)}, + {P4_1, SPI_7, CYHAL_PIN_IN_FUNCTION(P4_1_SCB7_SPI_MISO)}, + {P5_1, SPI_5, CYHAL_PIN_IN_FUNCTION(P5_1_SCB5_SPI_MISO)}, + {P6_1, SPI_3, CYHAL_PIN_IN_FUNCTION(P6_1_SCB3_SPI_MISO)}, + {P6_1, SPI_8, CYHAL_PIN_IN_FUNCTION(P6_1_SCB8_SPI_MISO)}, + {P6_5, SPI_6, CYHAL_PIN_IN_FUNCTION(P6_5_SCB6_SPI_MISO)}, + {P6_5, SPI_8, CYHAL_PIN_IN_FUNCTION(P6_5_SCB8_SPI_MISO)}, + {P7_1, SPI_4, CYHAL_PIN_IN_FUNCTION(P7_1_SCB4_SPI_MISO)}, + {P8_1, SPI_4, CYHAL_PIN_IN_FUNCTION(P8_1_SCB4_SPI_MISO)}, + {P9_1, SPI_2, CYHAL_PIN_IN_FUNCTION(P9_1_SCB2_SPI_MISO)}, + {P10_1, SPI_1, CYHAL_PIN_IN_FUNCTION(P10_1_SCB1_SPI_MISO)}, + {P11_1, SPI_5, CYHAL_PIN_IN_FUNCTION(P11_1_SCB5_SPI_MISO)}, + {P12_1, SPI_6, CYHAL_PIN_IN_FUNCTION(P12_1_SCB6_SPI_MISO)}, + {P13_1, SPI_6, CYHAL_PIN_IN_FUNCTION(P13_1_SCB6_SPI_MISO)}, + {NC, NC, 0} +}; +const PinMap PinMap_SPI_SCLK[] = { + {P0_4, SPI_0, CYHAL_PIN_OUT_FUNCTION(P0_4_SCB0_SPI_CLK)}, + {P1_2, SPI_7, CYHAL_PIN_OUT_FUNCTION(P1_2_SCB7_SPI_CLK)}, + {P2_2, SPI_1, CYHAL_PIN_OUT_FUNCTION(P2_2_SCB1_SPI_CLK)}, + {P3_2, SPI_2, CYHAL_PIN_OUT_FUNCTION(P3_2_SCB2_SPI_CLK)}, + {P5_2, SPI_5, CYHAL_PIN_OUT_FUNCTION(P5_2_SCB5_SPI_CLK)}, + {P6_2, SPI_3, CYHAL_PIN_OUT_FUNCTION(P6_2_SCB3_SPI_CLK)}, + {P6_2, SPI_8, CYHAL_PIN_OUT_FUNCTION(P6_2_SCB8_SPI_CLK)}, + {P6_6, SPI_6, CYHAL_PIN_OUT_FUNCTION(P6_6_SCB6_SPI_CLK)}, + {P6_6, SPI_8, CYHAL_PIN_OUT_FUNCTION(P6_6_SCB8_SPI_CLK)}, + {P7_2, SPI_4, CYHAL_PIN_OUT_FUNCTION(P7_2_SCB4_SPI_CLK)}, + {P8_2, SPI_4, CYHAL_PIN_OUT_FUNCTION(P8_2_SCB4_SPI_CLK)}, + {P9_2, SPI_2, CYHAL_PIN_OUT_FUNCTION(P9_2_SCB2_SPI_CLK)}, + {P10_2, SPI_1, CYHAL_PIN_OUT_FUNCTION(P10_2_SCB1_SPI_CLK)}, + {P11_2, SPI_5, CYHAL_PIN_OUT_FUNCTION(P11_2_SCB5_SPI_CLK)}, + {P12_2, SPI_6, CYHAL_PIN_OUT_FUNCTION(P12_2_SCB6_SPI_CLK)}, + {NC, NC, 0} +}; +const PinMap PinMap_SPI_SSEL[] = { + {P0_5, SPI_0, CYHAL_PIN_OUT_FUNCTION(P0_5_SCB0_SPI_SELECT0)}, + {P1_3, SPI_7, CYHAL_PIN_OUT_FUNCTION(P1_3_SCB7_SPI_SELECT0)}, + {P2_3, SPI_1, CYHAL_PIN_OUT_FUNCTION(P2_3_SCB1_SPI_SELECT0)}, + {P3_3, SPI_2, CYHAL_PIN_OUT_FUNCTION(P3_3_SCB2_SPI_SELECT0)}, + {P5_3, SPI_5, CYHAL_PIN_OUT_FUNCTION(P5_3_SCB5_SPI_SELECT0)}, + {P6_3, SPI_3, CYHAL_PIN_OUT_FUNCTION(P6_3_SCB3_SPI_SELECT0)}, + {P6_3, SPI_8, CYHAL_PIN_OUT_FUNCTION(P6_3_SCB8_SPI_SELECT0)}, + {P6_7, SPI_6, CYHAL_PIN_OUT_FUNCTION(P6_7_SCB6_SPI_SELECT0)}, + {P6_7, SPI_8, CYHAL_PIN_OUT_FUNCTION(P6_7_SCB8_SPI_SELECT0)}, + {P7_3, SPI_4, CYHAL_PIN_OUT_FUNCTION(P7_3_SCB4_SPI_SELECT0)}, + {P8_3, SPI_4, CYHAL_PIN_OUT_FUNCTION(P8_3_SCB4_SPI_SELECT0)}, + {P9_3, SPI_2, CYHAL_PIN_OUT_FUNCTION(P9_3_SCB2_SPI_SELECT0)}, + {P10_3, SPI_1, CYHAL_PIN_OUT_FUNCTION(P10_3_SCB1_SPI_SELECT0)}, + {P11_3, SPI_5, CYHAL_PIN_OUT_FUNCTION(P11_3_SCB5_SPI_SELECT0)}, + {P12_3, SPI_6, CYHAL_PIN_OUT_FUNCTION(P12_3_SCB6_SPI_SELECT0)}, + {NC, NC, 0} +}; +#endif // DEVICE_SPI + +#if DEVICE_PWMOUT +//*** PWM *** +const PinMap PinMap_PWM_OUT[] = { + // 16-bit PWM outputs + {P0_0, PWM_16b_0, CYHAL_PIN_OUT_FUNCTION(P0_0_TCPWM1_LINE0)}, + {P0_2, PWM_16b_1, CYHAL_PIN_OUT_FUNCTION(P0_2_TCPWM1_LINE1)}, + {P0_4, PWM_16b_2, CYHAL_PIN_OUT_FUNCTION(P0_4_TCPWM1_LINE2)}, + {P1_0, PWM_16b_3, CYHAL_PIN_OUT_FUNCTION(P1_0_TCPWM1_LINE3)}, + {P1_2, PWM_16b_12, CYHAL_PIN_OUT_FUNCTION(P1_2_TCPWM1_LINE12)}, + {P1_4, PWM_16b_13, CYHAL_PIN_OUT_FUNCTION(P1_4_TCPWM1_LINE13)}, + {P2_0, PWM_16b_15, CYHAL_PIN_OUT_FUNCTION(P2_0_TCPWM1_LINE15)}, + {P2_2, PWM_16b_16, CYHAL_PIN_OUT_FUNCTION(P2_2_TCPWM1_LINE16)}, + {P2_4, PWM_16b_17, CYHAL_PIN_OUT_FUNCTION(P2_4_TCPWM1_LINE17)}, + {P2_6, PWM_16b_18, CYHAL_PIN_OUT_FUNCTION(P2_6_TCPWM1_LINE18)}, + {P3_0, PWM_16b_19, CYHAL_PIN_OUT_FUNCTION(P3_0_TCPWM1_LINE19)}, + {P3_2, PWM_16b_20, CYHAL_PIN_OUT_FUNCTION(P3_2_TCPWM1_LINE20)}, + {P3_4, PWM_16b_21, CYHAL_PIN_OUT_FUNCTION(P3_4_TCPWM1_LINE21)}, + {P4_0, PWM_16b_22, CYHAL_PIN_OUT_FUNCTION(P4_0_TCPWM1_LINE22)}, + {P5_0, PWM_16b_4, CYHAL_PIN_OUT_FUNCTION(P5_0_TCPWM1_LINE4)}, + {P5_2, PWM_16b_5, CYHAL_PIN_OUT_FUNCTION(P5_2_TCPWM1_LINE5)}, + {P5_4, PWM_16b_6, CYHAL_PIN_OUT_FUNCTION(P5_4_TCPWM1_LINE6)}, + {P5_6, PWM_16b_7, CYHAL_PIN_OUT_FUNCTION(P5_6_TCPWM1_LINE7)}, + {P6_0, PWM_16b_8, CYHAL_PIN_OUT_FUNCTION(P6_0_TCPWM1_LINE8)}, + {P6_2, PWM_16b_9, CYHAL_PIN_OUT_FUNCTION(P6_2_TCPWM1_LINE9)}, + {P6_4, PWM_16b_10, CYHAL_PIN_OUT_FUNCTION(P6_4_TCPWM1_LINE10)}, + {P6_6, PWM_16b_11, CYHAL_PIN_OUT_FUNCTION(P6_6_TCPWM1_LINE11)}, + {P7_0, PWM_16b_12, CYHAL_PIN_OUT_FUNCTION(P7_0_TCPWM1_LINE12)}, + {P7_2, PWM_16b_13, CYHAL_PIN_OUT_FUNCTION(P7_2_TCPWM1_LINE13)}, + {P7_4, PWM_16b_14, CYHAL_PIN_OUT_FUNCTION(P7_4_TCPWM1_LINE14)}, + {P7_6, PWM_16b_15, CYHAL_PIN_OUT_FUNCTION(P7_6_TCPWM1_LINE15)}, + {P8_0, PWM_16b_16, CYHAL_PIN_OUT_FUNCTION(P8_0_TCPWM1_LINE16)}, + {P8_2, PWM_16b_17, CYHAL_PIN_OUT_FUNCTION(P8_2_TCPWM1_LINE17)}, + {P8_4, PWM_16b_18, CYHAL_PIN_OUT_FUNCTION(P8_4_TCPWM1_LINE18)}, + {P8_6, PWM_16b_19, CYHAL_PIN_OUT_FUNCTION(P8_6_TCPWM1_LINE19)}, + {P9_0, PWM_16b_20, CYHAL_PIN_OUT_FUNCTION(P9_0_TCPWM1_LINE20)}, + {P9_2, PWM_16b_21, CYHAL_PIN_OUT_FUNCTION(P9_2_TCPWM1_LINE21)}, + {P9_4, PWM_16b_0, CYHAL_PIN_OUT_FUNCTION(P9_4_TCPWM1_LINE0)}, + {P9_6, PWM_16b_1, CYHAL_PIN_OUT_FUNCTION(P9_6_TCPWM1_LINE1)}, + {P10_0, PWM_16b_22, CYHAL_PIN_OUT_FUNCTION(P10_0_TCPWM1_LINE22)}, + {P10_2, PWM_16b_23, CYHAL_PIN_OUT_FUNCTION(P10_2_TCPWM1_LINE23)}, + {P10_4, PWM_16b_0, CYHAL_PIN_OUT_FUNCTION(P10_4_TCPWM1_LINE0)}, + {P10_6, PWM_16b_2, CYHAL_PIN_OUT_FUNCTION(P10_6_TCPWM1_LINE2)}, + {P11_0, PWM_16b_1, CYHAL_PIN_OUT_FUNCTION(P11_0_TCPWM1_LINE1)}, + {P11_2, PWM_16b_2, CYHAL_PIN_OUT_FUNCTION(P11_2_TCPWM1_LINE2)}, + {P11_4, PWM_16b_3, CYHAL_PIN_OUT_FUNCTION(P11_4_TCPWM1_LINE3)}, + {P12_0, PWM_16b_4, CYHAL_PIN_OUT_FUNCTION(P12_0_TCPWM1_LINE4)}, + {P12_2, PWM_16b_5, CYHAL_PIN_OUT_FUNCTION(P12_2_TCPWM1_LINE5)}, + {P12_4, PWM_16b_6, CYHAL_PIN_OUT_FUNCTION(P12_4_TCPWM1_LINE6)}, + {P12_6, PWM_16b_7, CYHAL_PIN_OUT_FUNCTION(P12_6_TCPWM1_LINE7)}, + {P13_0, PWM_16b_8, CYHAL_PIN_OUT_FUNCTION(P13_0_TCPWM1_LINE8)}, + {P13_2, PWM_16b_9, CYHAL_PIN_OUT_FUNCTION(P13_2_TCPWM1_LINE9)}, + {P13_4, PWM_16b_10, CYHAL_PIN_OUT_FUNCTION(P13_4_TCPWM1_LINE10)}, + {P13_6, PWM_16b_11, CYHAL_PIN_OUT_FUNCTION(P13_6_TCPWM1_LINE11)}, + // 16-bit PWM inverted outputs + {P0_1, PWM_16b_0, CYHAL_PIN_OUT_FUNCTION(P0_1_TCPWM1_LINE_COMPL0)}, + {P0_3, PWM_16b_1, CYHAL_PIN_OUT_FUNCTION(P0_3_TCPWM1_LINE_COMPL1)}, + {P0_5, PWM_16b_2, CYHAL_PIN_OUT_FUNCTION(P0_5_TCPWM1_LINE_COMPL2)}, + {P1_1, PWM_16b_3, CYHAL_PIN_OUT_FUNCTION(P1_1_TCPWM1_LINE_COMPL3)}, + {P1_3, PWM_16b_12, CYHAL_PIN_OUT_FUNCTION(P1_3_TCPWM1_LINE_COMPL12)}, + {P1_5, PWM_16b_14, CYHAL_PIN_OUT_FUNCTION(P1_5_TCPWM1_LINE_COMPL14)}, + {P2_1, PWM_16b_15, CYHAL_PIN_OUT_FUNCTION(P2_1_TCPWM1_LINE_COMPL15)}, + {P2_3, PWM_16b_16, CYHAL_PIN_OUT_FUNCTION(P2_3_TCPWM1_LINE_COMPL16)}, + {P2_5, PWM_16b_17, CYHAL_PIN_OUT_FUNCTION(P2_5_TCPWM1_LINE_COMPL17)}, + {P2_7, PWM_16b_18, CYHAL_PIN_OUT_FUNCTION(P2_7_TCPWM1_LINE_COMPL18)}, + {P3_1, PWM_16b_19, CYHAL_PIN_OUT_FUNCTION(P3_1_TCPWM1_LINE_COMPL19)}, + {P3_3, PWM_16b_20, CYHAL_PIN_OUT_FUNCTION(P3_3_TCPWM1_LINE_COMPL20)}, + {P3_5, PWM_16b_21, CYHAL_PIN_OUT_FUNCTION(P3_5_TCPWM1_LINE_COMPL21)}, + {P4_1, PWM_16b_22, CYHAL_PIN_OUT_FUNCTION(P4_1_TCPWM1_LINE_COMPL22)}, + {P5_1, PWM_16b_4, CYHAL_PIN_OUT_FUNCTION(P5_1_TCPWM1_LINE_COMPL4)}, + {P5_3, PWM_16b_5, CYHAL_PIN_OUT_FUNCTION(P5_3_TCPWM1_LINE_COMPL5)}, + {P5_5, PWM_16b_6, CYHAL_PIN_OUT_FUNCTION(P5_5_TCPWM1_LINE_COMPL6)}, + {P5_7, PWM_16b_7, CYHAL_PIN_OUT_FUNCTION(P5_7_TCPWM1_LINE_COMPL7)}, + {P6_1, PWM_16b_8, CYHAL_PIN_OUT_FUNCTION(P6_1_TCPWM1_LINE_COMPL8)}, + {P6_3, PWM_16b_9, CYHAL_PIN_OUT_FUNCTION(P6_3_TCPWM1_LINE_COMPL9)}, + {P6_5, PWM_16b_10, CYHAL_PIN_OUT_FUNCTION(P6_5_TCPWM1_LINE_COMPL10)}, + {P6_7, PWM_16b_11, CYHAL_PIN_OUT_FUNCTION(P6_7_TCPWM1_LINE_COMPL11)}, + {P7_1, PWM_16b_12, CYHAL_PIN_OUT_FUNCTION(P7_1_TCPWM1_LINE_COMPL12)}, + {P7_3, PWM_16b_13, CYHAL_PIN_OUT_FUNCTION(P7_3_TCPWM1_LINE_COMPL13)}, + {P7_5, PWM_16b_14, CYHAL_PIN_OUT_FUNCTION(P7_5_TCPWM1_LINE_COMPL14)}, + {P7_7, PWM_16b_15, CYHAL_PIN_OUT_FUNCTION(P7_7_TCPWM1_LINE_COMPL15)}, + {P8_1, PWM_16b_16, CYHAL_PIN_OUT_FUNCTION(P8_1_TCPWM1_LINE_COMPL16)}, + {P8_3, PWM_16b_17, CYHAL_PIN_OUT_FUNCTION(P8_3_TCPWM1_LINE_COMPL17)}, + {P8_5, PWM_16b_18, CYHAL_PIN_OUT_FUNCTION(P8_5_TCPWM1_LINE_COMPL18)}, + {P8_7, PWM_16b_19, CYHAL_PIN_OUT_FUNCTION(P8_7_TCPWM1_LINE_COMPL19)}, + {P9_1, PWM_16b_20, CYHAL_PIN_OUT_FUNCTION(P9_1_TCPWM1_LINE_COMPL20)}, + {P9_3, PWM_16b_21, CYHAL_PIN_OUT_FUNCTION(P9_3_TCPWM1_LINE_COMPL21)}, + {P9_5, PWM_16b_0, CYHAL_PIN_OUT_FUNCTION(P9_5_TCPWM1_LINE_COMPL0)}, + {P9_7, PWM_16b_1, CYHAL_PIN_OUT_FUNCTION(P9_7_TCPWM1_LINE_COMPL1)}, + {P10_1, PWM_16b_22, CYHAL_PIN_OUT_FUNCTION(P10_1_TCPWM1_LINE_COMPL22)}, + {P10_3, PWM_16b_23, CYHAL_PIN_OUT_FUNCTION(P10_3_TCPWM1_LINE_COMPL23)}, + {P10_5, PWM_16b_0, CYHAL_PIN_OUT_FUNCTION(P10_5_TCPWM1_LINE_COMPL0)}, + {P10_7, PWM_16b_2, CYHAL_PIN_OUT_FUNCTION(P10_7_TCPWM1_LINE_COMPL2)}, + {P11_1, PWM_16b_1, CYHAL_PIN_OUT_FUNCTION(P11_1_TCPWM1_LINE_COMPL1)}, + {P11_3, PWM_16b_2, CYHAL_PIN_OUT_FUNCTION(P11_3_TCPWM1_LINE_COMPL2)}, + {P11_5, PWM_16b_3, CYHAL_PIN_OUT_FUNCTION(P11_5_TCPWM1_LINE_COMPL3)}, + {P12_1, PWM_16b_4, CYHAL_PIN_OUT_FUNCTION(P12_1_TCPWM1_LINE_COMPL4)}, + {P12_3, PWM_16b_5, CYHAL_PIN_OUT_FUNCTION(P12_3_TCPWM1_LINE_COMPL5)}, + {P12_5, PWM_16b_6, CYHAL_PIN_OUT_FUNCTION(P12_5_TCPWM1_LINE_COMPL6)}, + {P12_7, PWM_16b_7, CYHAL_PIN_OUT_FUNCTION(P12_7_TCPWM1_LINE_COMPL7)}, + {P13_1, PWM_16b_8, CYHAL_PIN_OUT_FUNCTION(P13_1_TCPWM1_LINE_COMPL8)}, + {P13_3, PWM_16b_9, CYHAL_PIN_OUT_FUNCTION(P13_3_TCPWM1_LINE_COMPL9)}, + {P13_5, PWM_16b_10, CYHAL_PIN_OUT_FUNCTION(P13_5_TCPWM1_LINE_COMPL10)}, + {P13_7, PWM_16b_11, CYHAL_PIN_OUT_FUNCTION(P13_7_TCPWM1_LINE_COMPL11)}, + // 32-bit PWM outputs + {P0_0, PWM_32b_0, CYHAL_PIN_OUT_FUNCTION(P0_0_TCPWM0_LINE0)}, + {P0_2, PWM_32b_1, CYHAL_PIN_OUT_FUNCTION(P0_2_TCPWM0_LINE1)}, + {P0_4, PWM_32b_2, CYHAL_PIN_OUT_FUNCTION(P0_4_TCPWM0_LINE2)}, + {P1_0, PWM_32b_3, CYHAL_PIN_OUT_FUNCTION(P1_0_TCPWM0_LINE3)}, + {P1_2, PWM_32b_4, CYHAL_PIN_OUT_FUNCTION(P1_2_TCPWM0_LINE4)}, + {P1_4, PWM_32b_5, CYHAL_PIN_OUT_FUNCTION(P1_4_TCPWM0_LINE5)}, + {P2_0, PWM_32b_6, CYHAL_PIN_OUT_FUNCTION(P2_0_TCPWM0_LINE6)}, + {P2_2, PWM_32b_7, CYHAL_PIN_OUT_FUNCTION(P2_2_TCPWM0_LINE7)}, + {P2_4, PWM_32b_0, CYHAL_PIN_OUT_FUNCTION(P2_4_TCPWM0_LINE0)}, + {P2_6, PWM_32b_1, CYHAL_PIN_OUT_FUNCTION(P2_6_TCPWM0_LINE1)}, + {P3_0, PWM_32b_2, CYHAL_PIN_OUT_FUNCTION(P3_0_TCPWM0_LINE2)}, + {P3_2, PWM_32b_3, CYHAL_PIN_OUT_FUNCTION(P3_2_TCPWM0_LINE3)}, + {P3_4, PWM_32b_4, CYHAL_PIN_OUT_FUNCTION(P3_4_TCPWM0_LINE4)}, + {P4_0, PWM_32b_5, CYHAL_PIN_OUT_FUNCTION(P4_0_TCPWM0_LINE5)}, + {P5_0, PWM_32b_4, CYHAL_PIN_OUT_FUNCTION(P5_0_TCPWM0_LINE4)}, + {P5_2, PWM_32b_5, CYHAL_PIN_OUT_FUNCTION(P5_2_TCPWM0_LINE5)}, + {P5_4, PWM_32b_6, CYHAL_PIN_OUT_FUNCTION(P5_4_TCPWM0_LINE6)}, + {P5_6, PWM_32b_7, CYHAL_PIN_OUT_FUNCTION(P5_6_TCPWM0_LINE7)}, + {P6_0, PWM_32b_0, CYHAL_PIN_OUT_FUNCTION(P6_0_TCPWM0_LINE0)}, + {P6_2, PWM_32b_1, CYHAL_PIN_OUT_FUNCTION(P6_2_TCPWM0_LINE1)}, + {P6_4, PWM_32b_2, CYHAL_PIN_OUT_FUNCTION(P6_4_TCPWM0_LINE2)}, + {P6_6, PWM_32b_3, CYHAL_PIN_OUT_FUNCTION(P6_6_TCPWM0_LINE3)}, + {P7_0, PWM_32b_4, CYHAL_PIN_OUT_FUNCTION(P7_0_TCPWM0_LINE4)}, + {P7_2, PWM_32b_5, CYHAL_PIN_OUT_FUNCTION(P7_2_TCPWM0_LINE5)}, + {P7_4, PWM_32b_6, CYHAL_PIN_OUT_FUNCTION(P7_4_TCPWM0_LINE6)}, + {P7_6, PWM_32b_7, CYHAL_PIN_OUT_FUNCTION(P7_6_TCPWM0_LINE7)}, + {P8_0, PWM_32b_0, CYHAL_PIN_OUT_FUNCTION(P8_0_TCPWM0_LINE0)}, + {P8_2, PWM_32b_1, CYHAL_PIN_OUT_FUNCTION(P8_2_TCPWM0_LINE1)}, + {P8_4, PWM_32b_2, CYHAL_PIN_OUT_FUNCTION(P8_4_TCPWM0_LINE2)}, + {P8_6, PWM_32b_3, CYHAL_PIN_OUT_FUNCTION(P8_6_TCPWM0_LINE3)}, + {P9_0, PWM_32b_4, CYHAL_PIN_OUT_FUNCTION(P9_0_TCPWM0_LINE4)}, + {P9_2, PWM_32b_5, CYHAL_PIN_OUT_FUNCTION(P9_2_TCPWM0_LINE5)}, + {P9_4, PWM_32b_7, CYHAL_PIN_OUT_FUNCTION(P9_4_TCPWM0_LINE7)}, + {P9_6, PWM_32b_0, CYHAL_PIN_OUT_FUNCTION(P9_6_TCPWM0_LINE0)}, + {P10_0, PWM_32b_6, CYHAL_PIN_OUT_FUNCTION(P10_0_TCPWM0_LINE6)}, + {P10_2, PWM_32b_7, CYHAL_PIN_OUT_FUNCTION(P10_2_TCPWM0_LINE7)}, + {P10_4, PWM_32b_0, CYHAL_PIN_OUT_FUNCTION(P10_4_TCPWM0_LINE0)}, + {P10_6, PWM_32b_1, CYHAL_PIN_OUT_FUNCTION(P10_6_TCPWM0_LINE1)}, + {P11_0, PWM_32b_1, CYHAL_PIN_OUT_FUNCTION(P11_0_TCPWM0_LINE1)}, + {P11_2, PWM_32b_2, CYHAL_PIN_OUT_FUNCTION(P11_2_TCPWM0_LINE2)}, + {P11_4, PWM_32b_3, CYHAL_PIN_OUT_FUNCTION(P11_4_TCPWM0_LINE3)}, + {P12_0, PWM_32b_4, CYHAL_PIN_OUT_FUNCTION(P12_0_TCPWM0_LINE4)}, + {P12_2, PWM_32b_5, CYHAL_PIN_OUT_FUNCTION(P12_2_TCPWM0_LINE5)}, + {P12_4, PWM_32b_6, CYHAL_PIN_OUT_FUNCTION(P12_4_TCPWM0_LINE6)}, + {P12_6, PWM_32b_7, CYHAL_PIN_OUT_FUNCTION(P12_6_TCPWM0_LINE7)}, + {P13_0, PWM_32b_0, CYHAL_PIN_OUT_FUNCTION(P13_0_TCPWM0_LINE0)}, + {P13_2, PWM_32b_1, CYHAL_PIN_OUT_FUNCTION(P13_2_TCPWM0_LINE1)}, + {P13_4, PWM_32b_2, CYHAL_PIN_OUT_FUNCTION(P13_4_TCPWM0_LINE2)}, + {P13_6, PWM_32b_3, CYHAL_PIN_OUT_FUNCTION(P13_6_TCPWM0_LINE3)}, + // 32-bit PWM inverted outputs + {P0_1, PWM_32b_0, CYHAL_PIN_OUT_FUNCTION(P0_1_TCPWM0_LINE_COMPL0)}, + {P0_3, PWM_32b_1, CYHAL_PIN_OUT_FUNCTION(P0_3_TCPWM0_LINE_COMPL1)}, + {P0_5, PWM_32b_2, CYHAL_PIN_OUT_FUNCTION(P0_5_TCPWM0_LINE_COMPL2)}, + {P1_1, PWM_32b_3, CYHAL_PIN_OUT_FUNCTION(P1_1_TCPWM0_LINE_COMPL3)}, + {P1_3, PWM_32b_4, CYHAL_PIN_OUT_FUNCTION(P1_3_TCPWM0_LINE_COMPL4)}, + {P1_5, PWM_32b_5, CYHAL_PIN_OUT_FUNCTION(P1_5_TCPWM0_LINE_COMPL5)}, + {P2_1, PWM_32b_6, CYHAL_PIN_OUT_FUNCTION(P2_1_TCPWM0_LINE_COMPL6)}, + {P2_3, PWM_32b_7, CYHAL_PIN_OUT_FUNCTION(P2_3_TCPWM0_LINE_COMPL7)}, + {P2_5, PWM_32b_0, CYHAL_PIN_OUT_FUNCTION(P2_5_TCPWM0_LINE_COMPL0)}, + {P2_7, PWM_32b_1, CYHAL_PIN_OUT_FUNCTION(P2_7_TCPWM0_LINE_COMPL1)}, + {P3_1, PWM_32b_2, CYHAL_PIN_OUT_FUNCTION(P3_1_TCPWM0_LINE_COMPL2)}, + {P3_3, PWM_32b_3, CYHAL_PIN_OUT_FUNCTION(P3_3_TCPWM0_LINE_COMPL3)}, + {P3_5, PWM_32b_4, CYHAL_PIN_OUT_FUNCTION(P3_5_TCPWM0_LINE_COMPL4)}, + {P4_1, PWM_32b_5, CYHAL_PIN_OUT_FUNCTION(P4_1_TCPWM0_LINE_COMPL5)}, + {P5_1, PWM_32b_4, CYHAL_PIN_OUT_FUNCTION(P5_1_TCPWM0_LINE_COMPL4)}, + {P5_3, PWM_32b_5, CYHAL_PIN_OUT_FUNCTION(P5_3_TCPWM0_LINE_COMPL5)}, + {P5_5, PWM_32b_6, CYHAL_PIN_OUT_FUNCTION(P5_5_TCPWM0_LINE_COMPL6)}, + {P5_7, PWM_32b_7, CYHAL_PIN_OUT_FUNCTION(P5_7_TCPWM0_LINE_COMPL7)}, + {P6_1, PWM_32b_0, CYHAL_PIN_OUT_FUNCTION(P6_1_TCPWM0_LINE_COMPL0)}, + {P6_3, PWM_32b_1, CYHAL_PIN_OUT_FUNCTION(P6_3_TCPWM0_LINE_COMPL1)}, + {P6_5, PWM_32b_2, CYHAL_PIN_OUT_FUNCTION(P6_5_TCPWM0_LINE_COMPL2)}, + {P6_7, PWM_32b_3, CYHAL_PIN_OUT_FUNCTION(P6_7_TCPWM0_LINE_COMPL3)}, + {P7_1, PWM_32b_4, CYHAL_PIN_OUT_FUNCTION(P7_1_TCPWM0_LINE_COMPL4)}, + {P7_3, PWM_32b_5, CYHAL_PIN_OUT_FUNCTION(P7_3_TCPWM0_LINE_COMPL5)}, + {P7_5, PWM_32b_6, CYHAL_PIN_OUT_FUNCTION(P7_5_TCPWM0_LINE_COMPL6)}, + {P7_7, PWM_32b_7, CYHAL_PIN_OUT_FUNCTION(P7_7_TCPWM0_LINE_COMPL7)}, + {P8_1, PWM_32b_0, CYHAL_PIN_OUT_FUNCTION(P8_1_TCPWM0_LINE_COMPL0)}, + {P8_3, PWM_32b_1, CYHAL_PIN_OUT_FUNCTION(P8_3_TCPWM0_LINE_COMPL1)}, + {P8_5, PWM_32b_2, CYHAL_PIN_OUT_FUNCTION(P8_5_TCPWM0_LINE_COMPL2)}, + {P8_7, PWM_32b_3, CYHAL_PIN_OUT_FUNCTION(P8_7_TCPWM0_LINE_COMPL3)}, + {P9_1, PWM_32b_4, CYHAL_PIN_OUT_FUNCTION(P9_1_TCPWM0_LINE_COMPL4)}, + {P9_3, PWM_32b_5, CYHAL_PIN_OUT_FUNCTION(P9_3_TCPWM0_LINE_COMPL5)}, + {P9_5, PWM_32b_7, CYHAL_PIN_OUT_FUNCTION(P9_5_TCPWM0_LINE_COMPL7)}, + {P9_7, PWM_32b_0, CYHAL_PIN_OUT_FUNCTION(P9_7_TCPWM0_LINE_COMPL0)}, + {P10_1, PWM_32b_6, CYHAL_PIN_OUT_FUNCTION(P10_1_TCPWM0_LINE_COMPL6)}, + {P10_3, PWM_32b_7, CYHAL_PIN_OUT_FUNCTION(P10_3_TCPWM0_LINE_COMPL7)}, + {P10_5, PWM_32b_0, CYHAL_PIN_OUT_FUNCTION(P10_5_TCPWM0_LINE_COMPL0)}, + {P10_7, PWM_32b_1, CYHAL_PIN_OUT_FUNCTION(P10_7_TCPWM0_LINE_COMPL1)}, + {P11_1, PWM_32b_1, CYHAL_PIN_OUT_FUNCTION(P11_1_TCPWM0_LINE_COMPL1)}, + {P11_3, PWM_32b_2, CYHAL_PIN_OUT_FUNCTION(P11_3_TCPWM0_LINE_COMPL2)}, + {P11_5, PWM_32b_3, CYHAL_PIN_OUT_FUNCTION(P11_5_TCPWM0_LINE_COMPL3)}, + {P12_1, PWM_32b_4, CYHAL_PIN_OUT_FUNCTION(P12_1_TCPWM0_LINE_COMPL4)}, + {P12_3, PWM_32b_5, CYHAL_PIN_OUT_FUNCTION(P12_3_TCPWM0_LINE_COMPL5)}, + {P12_5, PWM_32b_6, CYHAL_PIN_OUT_FUNCTION(P12_5_TCPWM0_LINE_COMPL6)}, + {P12_7, PWM_32b_7, CYHAL_PIN_OUT_FUNCTION(P12_7_TCPWM0_LINE_COMPL7)}, + {P13_1, PWM_32b_0, CYHAL_PIN_OUT_FUNCTION(P13_1_TCPWM0_LINE_COMPL0)}, + {P13_3, PWM_32b_1, CYHAL_PIN_OUT_FUNCTION(P13_3_TCPWM0_LINE_COMPL1)}, + {P13_5, PWM_32b_2, CYHAL_PIN_OUT_FUNCTION(P13_5_TCPWM0_LINE_COMPL2)}, + {P13_7, PWM_32b_3, CYHAL_PIN_OUT_FUNCTION(P13_7_TCPWM0_LINE_COMPL3)}, + {NC, NC, 0} +}; +#endif // DEVICE_PWMOUT + +#if DEVICE_ANALOGIN +const PinMap PinMap_ADC[] = { + {P10_0, ADC_0, CYHAL_PIN_ANALOG_FUNCTION(HSIOM_SEL_GPIO)}, + {P10_1, ADC_0, CYHAL_PIN_ANALOG_FUNCTION(HSIOM_SEL_GPIO)}, + {P10_2, ADC_0, CYHAL_PIN_ANALOG_FUNCTION(HSIOM_SEL_GPIO)}, + {P10_3, ADC_0, CYHAL_PIN_ANALOG_FUNCTION(HSIOM_SEL_GPIO)}, + {P10_4, ADC_0, CYHAL_PIN_ANALOG_FUNCTION(HSIOM_SEL_GPIO)}, + {P10_5, ADC_0, CYHAL_PIN_ANALOG_FUNCTION(HSIOM_SEL_GPIO)}, + {P10_6, ADC_0, CYHAL_PIN_ANALOG_FUNCTION(HSIOM_SEL_GPIO)}, + {P10_7, ADC_0, CYHAL_PIN_ANALOG_FUNCTION(HSIOM_SEL_GPIO)}, + {NC, NC, 0} +}; +#endif // DEVICE_ANALOGIN + +#if DEVICE_ANALOGOUT +const PinMap PinMap_DAC[] = { + {P9_6, DAC_0, CYHAL_PIN_ANALOG_FUNCTION(HSIOM_SEL_GPIO)}, + {NC, NC, 0} +}; +#endif // DEVICE_ANALOGIN + +#if DEVICE_QSPI +const PinMap PinMap_QSPI_SCLK[] = { + {P11_7, QSPI_0, CY_GPIO_CFG_CREATE(P11_7_SMIF_SPI_CLK, CY_GPIO_DM_STRONG_IN_OFF)}, + {NC, NC, 0}, +}; +const PinMap PinMap_QSPI_SSEL[] = { + {P11_2, QSPI_0, CY_GPIO_CFG_CREATE(P11_2_SMIF_SPI_SELECT0, CY_GPIO_DM_STRONG_IN_OFF)}, + {NC, NC, 0}, +}; +const PinMap PinMap_QSPI_DATA0[] = { + {P11_6, QSPI_0, CY_GPIO_CFG_CREATE(P11_6_SMIF_SPI_DATA0, CY_GPIO_DM_STRONG)}, + {NC, NC, 0}, +}; +const PinMap PinMap_QSPI_DATA1[] = { + {P11_5, QSPI_0, CY_GPIO_CFG_CREATE(P11_5_SMIF_SPI_DATA1, CY_GPIO_DM_STRONG)}, + {NC, NC, 0}, +}; +const PinMap PinMap_QSPI_DATA2[] = { + {P11_4, QSPI_0, CY_GPIO_CFG_CREATE(P11_4_SMIF_SPI_DATA2, CY_GPIO_DM_STRONG)}, + {NC, NC, 0}, +}; +const PinMap PinMap_QSPI_DATA3[] = { + {P11_3, QSPI_0, CY_GPIO_CFG_CREATE(P11_3_SMIF_SPI_DATA3, CY_GPIO_DM_STRONG)}, + {NC, NC, 0}, +}; +#endif // DEVICE_QSPI diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/SDIO_HOST/SDIO_HOST.c b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/SDIO_HOST/SDIO_HOST.c new file mode 100644 index 00000000000..6c8154e78d5 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/SDIO_HOST/SDIO_HOST.c @@ -0,0 +1,1504 @@ +/***************************************************************************//** +* \file SDIO_HOST.c +* +* \brief +* This file provides the source code to the API for the UDB based SDIO driver. +* +******************************************************************************** +* \copyright +* Copyright 2016-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*******************************************************************************/ + +#include "SDIO_HOST.h" +#include "cy_utils.h" + +#if defined(__cplusplus) +extern "C" { +#endif + +#ifdef CY_RTOS_AWARE + + #include "cyabs_rtos.h" + + #define NEVER_TIMEOUT ( (uint32_t)0xffffffffUL ) + static cy_semaphore_t sdio_transfer_finished_semaphore; + static bool sema_initialized = false; +#endif + +/* Backup struct used to store and restore non retention UDB registers */ +typedef struct +{ + uint32_t CY_SDIO_UDB_WRKMULT_CTL_0; + uint32_t CY_SDIO_UDB_WRKMULT_CTL_1; + uint32_t CY_SDIO_UDB_WRKMULT_CTL_2; + uint32_t CY_SDIO_UDB_WRKMULT_CTL_3; +} stc_sdio_backup_regs_t; + +/*Globals Needed for DMA */ +/*DMA channel structures*/ +cy_stc_dma_channel_config_t respChannelConfig; +cy_stc_dma_channel_config_t cmdChannelConfig; +cy_stc_dma_channel_config_t writeChannelConfig; +cy_stc_dma_channel_config_t readChannelConfig; + +/*DMA Descriptor structures*/ +cy_stc_dma_descriptor_t respDesr; +cy_stc_dma_descriptor_t cmdDesr; +cy_stc_dma_descriptor_t readDesr0; +cy_stc_dma_descriptor_t readDesr1; +cy_stc_dma_descriptor_t writeDesr0; +cy_stc_dma_descriptor_t writeDesr1; + +/*Global structure used for data keeping*/ +stc_sdio_gInternalData_t gstcInternalData; + +/*Global CRC table*/ +static uint8_t crcTable[256]; + +/*Global values used for DMA interrupt*/ +static uint32_t yCountRemainder; +static uint32_t yCounts; + +/* Global value for card interrupt */ +static uint8_t pfnCardInt_count = 0; + +/*Global structure to store UDB registers */ +static stc_sdio_backup_regs_t regs; + +static uint32_t udb_initialized = 0; + +cy_stc_syspm_callback_params_t sdio_pm_callback_params; +cy_stc_syspm_callback_t sdio_pm_callback_handler; + +/* Deep Sleep Mode API Support */ +static void SDIO_SaveConfig(void); +static void SDIO_RestoreConfig(void); + +/******************************************************************************* +* Function Name: SDIO_DeepSleepCallback +****************************************************************************//** +* +* Callback executed during Deep Sleep entry/exit +* +* \param params +* Pointer to structure that holds callback parameters for this driver. +* +* \param mode +* The state transition mode that is currently happening. +* +* \note +* Saves/Restores SDIO UDB registers +* +* \return +* CY_SYSPM_SUCCESS if the transition was successful, otherwise CY_SYSPM_FAIL +* +*******************************************************************************/ +cy_en_syspm_status_t SDIO_DeepSleepCallback(cy_stc_syspm_callback_params_t *params, cy_en_syspm_callback_mode_t mode) +{ + CY_UNUSED_PARAMETER(params); + cy_en_syspm_status_t status = CY_SYSPM_FAIL; + + switch (mode) + { + case CY_SYSPM_CHECK_READY: + case CY_SYSPM_CHECK_FAIL: + status = CY_SYSPM_SUCCESS; + break; + + case CY_SYSPM_BEFORE_TRANSITION: + SDIO_SaveConfig(); + status = CY_SYSPM_SUCCESS; + break; + + case CY_SYSPM_AFTER_TRANSITION: + SDIO_RestoreConfig(); + status = CY_SYSPM_SUCCESS; + break; + + default: + break; + } + + return status; +} + +/******************************************************************************* +* Function Name: SDIO_Init +****************************************************************************//** +* +* Initializes the SDIO hardware +* +* \param pfuCb +* Pointer to structure that holds pointers to callback function +* see \ref stc_sdio_irq_cb_t. +* +* \note +* Sets SD Clock Frequency to 400 kHz +*******************************************************************************/ +void SDIO_Init(stc_sdio_irq_cb_t* pfuCb) +{ + if ( !udb_initialized ) + { + udb_initialized = 1; + SDIO_Host_Config_TriggerMuxes(); + SDIO_Host_Config_UDBs(); + } + + /*Set Number of Blocks to 1 initially, this will be updated later*/ + SDIO_SetNumBlocks(1); + + /*Enable SDIO ISR*/ + NVIC_EnableIRQ((IRQn_Type) SDIO_HOST_sdio_int__INTC_NUMBER); + + /*Enable the Status Reg to generate an interrupt*/ + SDIO_STATUS_AUX_CTL |= (0x10); + + /*Set the priority of DW0, DW1, M4 and M0. DW1 should have highest*/ + /*First clear priority of all*/ + (* (reg32 *)CYREG_PROT_SMPU_MS0_CTL) &= ~0x0300; + (* (reg32 *)CYREG_PROT_SMPU_MS2_CTL) &= ~0x0300; + (* (reg32 *)CYREG_PROT_SMPU_MS3_CTL) &= ~0x0300; + (* (reg32 *)CYREG_PROT_SMPU_MS14_CTL) &= ~0x0300; + + /*Next set priority DW1 = 0, DW0 = 1, M4 = 2, M0 =3*/ + (* (reg32 *)CYREG_PROT_SMPU_MS2_CTL) |= 0x0100; + (* (reg32 *)CYREG_PROT_SMPU_MS0_CTL) |= 0x0200; + (* (reg32 *)CYREG_PROT_SMPU_MS14_CTL) |= 0x0200; + + /*Setup callback for card interrupt*/ + gstcInternalData.pstcCallBacks.pfnCardIntCb = pfuCb->pfnCardIntCb; + + /*Setup the DMA channels*/ + SDIO_SetupDMA(); + + /*Initialize CRC*/ + SDIO_Crc7Init(); + + /*Enable all the bit counters*/ + SDIO_CMD_BIT_CNT_CONTROL_REG |= SDIO_ENABLE_CNT; + SDIO_WRITE_CRC_CNT_CONTROL_REG |= SDIO_ENABLE_CNT; + SDIO_CRC_BIT_CNT_CONTROL_REG |= SDIO_ENABLE_CNT; + SDIO_BYTE_CNT_CONTROL_REG |= SDIO_ENABLE_CNT; + + /*Set block byte count to 64, this will be changed later */ + SDIO_SetBlockSize(64); + + /*Set the read and write FIFOs to use the half full status*/ + (*(reg32 *) SDIO_HOST_bSDIO_Write_DP__DP_AUX_CTL_REG) |= 0x0c; + (*(reg32 *) SDIO_HOST_bSDIO_Read_DP__DP_AUX_CTL_REG) |= 0x0c; + + /*Set clock to 400k, and enable it*/ + SDIO_SetSdClkFrequency(400000); + SDIO_EnableIntClock(); + SDIO_EnableSdClk(); +} + + +/******************************************************************************* +* Function Name: SDIO_SendCommand +****************************************************************************//** +* +* Send an SDIO command, don't wait for it to finish. +* +* \param pstcCmdConfig +* Command configuration structure. See \ref stc_sdio_cmd_config_t. +* +*******************************************************************************/ +void SDIO_SendCommand(stc_sdio_cmd_config_t *pstcCmdConfig) +{ + /*buffer to hold command data*/ + static uint8_t u8cmdBuf[6]; + + /*Populate buffer*/ + /*Element 0 is the Most Significant Byte*/ + u8cmdBuf[0] = SDIO_HOST_DIR | pstcCmdConfig->u8CmdIndex; + u8cmdBuf[1] = (uint8_t)((pstcCmdConfig->u32Argument & 0xff000000)>>24); + u8cmdBuf[2] = (uint8_t)((pstcCmdConfig->u32Argument & 0x00ff0000)>>16); + u8cmdBuf[3] = (uint8_t)((pstcCmdConfig->u32Argument & 0x0000ff00)>>8); + u8cmdBuf[4] = (uint8_t)((pstcCmdConfig->u32Argument & 0x000000ff)); + + /*calculate the CRC of above data*/ + u8cmdBuf[5] = SDIO_CalculateCrc7(u8cmdBuf, 5); + /*Shift it up by 1 as the CRC takes the upper 7 bits of the last byte of the cmd*/ + u8cmdBuf[5] = u8cmdBuf[5] << 1; + /*Add on the end bit*/ + u8cmdBuf[5] = u8cmdBuf[5] | SDIO_CMD_END_BIT; + + /*Load the first byte into A0*/ + SDIO_CMD_COMMAND_A0_REG = u8cmdBuf[0]; + + /*If a response is expected setup DMA to receive the response*/ + if (pstcCmdConfig->bResponseRequired == true) + { + /*Clear the flag in hardware that says skip response*/ + SDIO_CONTROL_REG &= ~SDIO_CTRL_SKIP_RESPONSE; + + /*Set the destination address*/ + respDesr.dst = (uint32_t)(pstcCmdConfig->pu8ResponseBuf); + + /*Initialize the channel with the descriptor*/ + Cy_DMA_Channel_SetDescriptor(SDIO_HOST_Resp_DMA_HW, SDIO_HOST_Resp_DMA_DW_CHANNEL, &respDesr); + + /*Enable the channel*/ + Cy_DMA_Channel_Enable(SDIO_HOST_Resp_DMA_HW, SDIO_HOST_Resp_DMA_DW_CHANNEL); + } + else + { + /*Set the skip flag*/ + SDIO_CONTROL_REG |= SDIO_CTRL_SKIP_RESPONSE; + } + + /*Setup the Command DMA*/ + /*Set the source address*/ + cmdDesr.src = (uint32_t)(&u8cmdBuf[1]); + + /*Initialize the channel with the descriptor*/ + Cy_DMA_Channel_SetDescriptor(SDIO_HOST_CMD_DMA_HW, SDIO_HOST_CMD_DMA_DW_CHANNEL , &cmdDesr); + + /*Enable the channel*/ + Cy_DMA_Channel_Enable(SDIO_HOST_CMD_DMA_HW, SDIO_HOST_CMD_DMA_DW_CHANNEL ); +} + + +/******************************************************************************* +* Function Name: SDIO_GetResponse +****************************************************************************//** +* +* Takes a 6 byte response buffer, and extracts the 32 bit response, also checks +* for index errors, CRC errors, and end bit errors. +* +* \param bCmdIndexCheck +* If True check for index errors +* +* \param bCmdCrcCheck +* If True check for CRC errors +* +* \param u8cmdIdx +* Command index, used for checking the index error +* +* \param pu32Response +* location to store 32 bit response +* +* \param pu8ResponseBuf +* buffer that holds the 6 bytes of response data +* +* \return +* \ref en_sdio_result_t +* +*******************************************************************************/ +en_sdio_result_t SDIO_GetResponse(uint8_t bCmdIndexCheck, uint8_t bCmdCrcCheck, uint8_t u8cmdIdx, uint32_t* pu32Response, uint8_t *pu8ResponseBuf) +{ + /*Function return*/ + en_sdio_result_t enRet = Error; + /*variable to hold temporary CRC*/ + uint8_t u8TmpCrc; + /*temporary response*/ + uint32_t u32TmpResponse; + + /*Zero out the pu32Response*/ + *pu32Response = 0; + + /*Check if the CRC needs to be checked*/ + if (bCmdCrcCheck) + { + /*Calculate the CRC*/ + u8TmpCrc = SDIO_CalculateCrc7(pu8ResponseBuf, 5); + + /*Shift calculated CRC up by one bit to match bit position of CRC*/ + u8TmpCrc = u8TmpCrc << 1; + + /*Compare calculated CRC with received CRC*/ + if ((u8TmpCrc & 0xfe) != (pu8ResponseBuf[5] & 0xfe)) + { + enRet |= CommandCrcError; + } + } + + /*Check if the index needs to be checked*/ + if (bCmdIndexCheck) + { + /*The index resides in the lower 6 bits of the 1st byte of the response*/ + if ((u8cmdIdx != (pu8ResponseBuf[0] & 0x3f))) + { + enRet |= CommandIdxError; + } + } + + /*Check the end bit*/ + if (!(pu8ResponseBuf[5] & 0x01)) + { + enRet |= CommandEndError; + } + + if (enRet == Error) + { + /*If we get here then there were no errors with the command populate the response*/ + u32TmpResponse = pu8ResponseBuf[1]; + u32TmpResponse = u32TmpResponse << 8; + u32TmpResponse |= pu8ResponseBuf[2]; + u32TmpResponse = u32TmpResponse << 8; + u32TmpResponse |= pu8ResponseBuf[3]; + u32TmpResponse = u32TmpResponse << 8; + u32TmpResponse |= pu8ResponseBuf[4]; + + *pu32Response = u32TmpResponse; + + enRet = Ok; + } + + return enRet; +} + + +/******************************************************************************* +* Function Name: SDIO_InitDataTransfer +****************************************************************************//** +* +* Configure the data channel for a data transfer. For a write this doesn't start +* the write, that must be done separately after the response is received. +* +* \param pstcDataConfig +* Data configuration structure. See \ref stc_sdio_data_config_t +* +* +*******************************************************************************/ +void SDIO_InitDataTransfer(stc_sdio_data_config_t *pstcDataConfig) +{ + /*hold size of entire transfer*/ + uint32_t dataSize; + + /*calculate how many bytes are going to be sent*/ + dataSize = pstcDataConfig->u16BlockSize * pstcDataConfig->u16BlockCount; + + /*Set the block size and number of blocks*/ + SDIO_SetBlockSize(pstcDataConfig->u16BlockSize); + SDIO_SetNumBlocks((pstcDataConfig->u16BlockCount) - 1); + + /*If we are reading data setup the DMA to receive read data*/ + if (pstcDataConfig->bRead == true) + { + /*First disable the write channel*/ + Cy_DMA_Channel_Disable(SDIO_HOST_Write_DMA_HW, SDIO_HOST_Write_DMA_DW_CHANNEL ); + + /*Clear any pending interrupts in the DMA*/ + Cy_DMA_Channel_ClearInterrupt(SDIO_HOST_Read_DMA_HW, SDIO_HOST_Read_DMA_DW_CHANNEL); + + NVIC_ClearPendingIRQ((IRQn_Type) SDIO_HOST_Read_Int_INTC_NUMBER); + + /*setup the destination addresses*/ + readDesr0.dst = (uint32_t)(pstcDataConfig->pu8Data); + readDesr1.dst = (uint32_t)((pstcDataConfig->pu8Data) + 1024); + + /*Setup the X control to transfer two 16 bit elements per transfer for a total of 4 bytes + Remember X increment is in terms of data element size which is 16, thus why it is 1*/ + readDesr0.xCtl = _VAL2FLD(CY_DMA_CTL_COUNT, 1) | + _VAL2FLD(CY_DMA_CTL_DST_INCR, 1); + readDesr1.xCtl = _VAL2FLD(CY_DMA_CTL_COUNT, 1) | + _VAL2FLD(CY_DMA_CTL_DST_INCR, 1); + + /*The X Loop will always transfer 4 bytes. The FIFO will only trigger the + DMA when it has 4 bytes to send (2 in each F0 and F1). There is a possibility + that there could be 3,2,or 1 bytes still in the FIFOs. To solve this the DMA + will be SW triggered when hardware indicates all bytes have been received. + This leads to an extra 1, 2 or 3 bytes being received. So the RX buffer needs to + be at least 3 bytes bigger than the data size. + + Since the X loop is setup to 4, the maximum number of Y loop is 256 so one + descriptor can transfer 1024 bytes. Two descriptors can transfer 2048 bytes. + Since we don't know the maximum number of bytes to read only two descriptors will + be used. If more than 2048 bytes need to be read then and interrupt will be enabled + The descriptor that is not currently running will be updated in the ISR to receive + more data. + + So there are three conditions to check: + 1) Are we sending less than or equal to 1024 bytes if so use one descriptor + 2) Are we sending greater than 1024, but less than or equal to 2048, use two descriptors + 3) Greater than 2048, use two descriptors and the ISR + */ + + if (dataSize <= 1024) + { + /*Setup one descriptor*/ + /*Y Increment is 2 because the X is transfer 2 data elements (which are 16 bits)*/ + readDesr0.yCtl = _VAL2FLD(CY_DMA_CTL_COUNT, (dataSize - 1) / 4) | + _VAL2FLD(CY_DMA_CTL_DST_INCR, 2); + + /*Setup descriptor 0 to point to nothing and disable*/ + readDesr0.nextPtr = 0; + readDesr0.ctl |= 0x01000000; + + /*Disable Interrupt*/ + NVIC_DisableIRQ((IRQn_Type) SDIO_HOST_Read_Int_INTC_NUMBER); + } + else if (dataSize <=2048) + { + /*setup the first descriptor for 1024, then setup 2nd descriptor for remainder*/ + + readDesr0.yCtl = _VAL2FLD(CY_DMA_CTL_COUNT, 255) | + _VAL2FLD(CY_DMA_CTL_DST_INCR, 2); + readDesr1.yCtl = _VAL2FLD(CY_DMA_CTL_COUNT, (dataSize - 1025) / 4) | + _VAL2FLD(CY_DMA_CTL_DST_INCR, 2); + + + /*Setup descriptor 0 to point to descriptor 1*/ + readDesr0.nextPtr = (uint32_t)(&readDesr1); + /*Setup descriptor 1 to point to nothing and disable */ + readDesr1.nextPtr = 0; + + /*Don't disable after first descriptor*/ + readDesr0.ctl &= ~0x01000000; + /*Disable after second descriptor*/ + readDesr1.ctl |= 0x01000000; + + /*Disable Interrupt*/ + NVIC_DisableIRQ((IRQn_Type) SDIO_HOST_Read_Int_INTC_NUMBER); + } + else /*dataSize must be greater than 2048*/ + { + /*These are for the ISR, Need to figure out how many "descriptors" + need to run, and the yCount for last descriptor. + Example: dataSize = 2080 + yCounts = 2, yCountRemainder = 7 (send 8 more set of 4)*/ + yCounts = (dataSize / 1024); + + /*the Ycount register is a +1 register meaning 0 = 1. I However, need to know when there is + no remainder so I increase the value to make sure there is a remainder and decrement in the ISR*/ + yCountRemainder = (((dataSize - (yCounts * 1024)) + 3 ) / 4); + + /*Setup the Y Ctrl for both descriptors*/ + readDesr0.yCtl = _VAL2FLD(CY_DMA_CTL_COUNT, 255) | + _VAL2FLD(CY_DMA_CTL_DST_INCR, 2); + readDesr1.yCtl = _VAL2FLD(CY_DMA_CTL_COUNT, 255) | + _VAL2FLD(CY_DMA_CTL_DST_INCR, 2); + + /*Setup descriptor 0 to point to descriptor 1*/ + readDesr0.nextPtr = (uint32_t)(&readDesr1); + /*Setup descriptor 1 to point to descriptor 0*/ + readDesr1.nextPtr = (uint32_t)(&readDesr0); + + /*Don't disable the channel on completion of descriptor*/ + readDesr0.ctl &= ~0x01000000; + readDesr1.ctl &= ~0x01000000; + + /*Decrement yCounts by 2 since we already have 2 descriptors setup*/ + yCounts -= 2; + + /*Enable DMA interrupt*/ + NVIC_EnableIRQ((IRQn_Type) SDIO_HOST_Read_Int_INTC_NUMBER); + } + + /*Initialize the channel with the first descriptor*/ + Cy_DMA_Channel_SetDescriptor(SDIO_HOST_Read_DMA_HW, SDIO_HOST_Read_DMA_DW_CHANNEL , &readDesr0); + + /*Enable the channel*/ + Cy_DMA_Channel_Enable(SDIO_HOST_Read_DMA_HW, SDIO_HOST_Read_DMA_DW_CHANNEL ); + + /*Set the flag in the control register to enable the read*/ + SDIO_CONTROL_REG |= SDIO_CTRL_ENABLE_READ; + } + + /*Otherwise it is a write*/ + else + { + /*First disable the Read channel*/ + Cy_DMA_Channel_Disable(SDIO_HOST_Read_DMA_HW, SDIO_HOST_Read_DMA_DW_CHANNEL ); + + /*Clear any pending interrupts in the DMA*/ + Cy_DMA_Channel_ClearInterrupt(SDIO_HOST_Write_DMA_HW, SDIO_HOST_Write_DMA_DW_CHANNEL); + + NVIC_ClearPendingIRQ((IRQn_Type) SDIO_HOST_Write_Int_INTC_NUMBER); + + /*setup the SRC addresses*/ + writeDesr0.src = (uint32_t)(pstcDataConfig->pu8Data); + writeDesr1.src = (uint32_t)((pstcDataConfig->pu8Data) + 1024); + + + /*Setup the X control to transfer two 16 bit elements per transfer for a total of 4 bytes + Remember X increment is in terms of data element size which is 16, thus why it is 1*/ + writeDesr0.xCtl = _VAL2FLD(CY_DMA_CTL_COUNT, 1) | + _VAL2FLD(CY_DMA_CTL_SRC_INCR, 1); + writeDesr1.xCtl = _VAL2FLD(CY_DMA_CTL_COUNT, 1) | + _VAL2FLD(CY_DMA_CTL_SRC_INCR, 1); + + if (dataSize <= 1024) + { + /*Setup one descriptor*/ + /*Y Increment is 2 because the X is transfer 2 data elements (which are 16 bits)*/ + writeDesr0.yCtl = _VAL2FLD(CY_DMA_CTL_COUNT, (dataSize - 1) / 4) | + _VAL2FLD(CY_DMA_CTL_SRC_INCR, 2); + + /*Setup descriptor 0 to point to nothing and disable*/ + writeDesr0.nextPtr = 0; + writeDesr0.ctl |= 0x01000000; + + /*Disable Interrupt*/ + NVIC_DisableIRQ((IRQn_Type) SDIO_HOST_Write_Int_INTC_NUMBER); + } + else if (dataSize <=2048) + { + /*setup the first descriptor for 1024, then setup 2nd descriptor for remainder*/ + + writeDesr0.yCtl = _VAL2FLD(CY_DMA_CTL_COUNT, 255) | + _VAL2FLD(CY_DMA_CTL_SRC_INCR, 2); + writeDesr1.yCtl = _VAL2FLD(CY_DMA_CTL_COUNT, (dataSize - 1025) / 4) | + _VAL2FLD(CY_DMA_CTL_SRC_INCR, 2); + + + /*Setup descriptor 0 to point to descriptor 1*/ + writeDesr0.nextPtr = (uint32_t)(&writeDesr1); + /*Setup descriptor 1 to point to nothing and disable */ + writeDesr1.nextPtr = 0; + + /*Don't disable after first descriptor*/ + writeDesr0.ctl &= ~0x01000000; + /*Disable after second descriptor*/ + writeDesr1.ctl |= 0x01000000; + + /*Disable Interrupt*/ + NVIC_DisableIRQ((IRQn_Type) SDIO_HOST_Write_Int_INTC_NUMBER); + } + else /*dataSize must be greater than 2048*/ + { + /*These are for the ISR, Need to figure out how many "descriptors" + need to run, and the yCount for last descriptor. + Example: dataSize = 2080 + yCounts = 2, yCountRemainder = 7 (send 8 more set of 4)*/ + yCounts = (dataSize / 1024); + + /*the Ycount register is a +1 register meaning 0 = 1. I However, need to know when there is + no remainder so I increase the value to make sure there is a remainder and decrement in the ISR*/ + yCountRemainder = (((dataSize - (yCounts * 1024)) + 3 ) / 4); + + /*Setup the Y Ctrl for both descriptors*/ + writeDesr0.yCtl = _VAL2FLD(CY_DMA_CTL_COUNT, 255) | + _VAL2FLD(CY_DMA_CTL_SRC_INCR, 2); + writeDesr1.yCtl = _VAL2FLD(CY_DMA_CTL_COUNT, 255) | + _VAL2FLD(CY_DMA_CTL_SRC_INCR, 2); + + /*Setup descriptor 0 to point to descriptor 1*/ + writeDesr0.nextPtr = (uint32_t)(&writeDesr1); + /*Setup descriptor 1 to point to descriptor 0*/ + writeDesr1.nextPtr = (uint32_t)(&writeDesr0); + + /*Don't disable the channel on completion of descriptor*/ + writeDesr0.ctl &= ~0x01000000; + writeDesr1.ctl &= ~0x01000000; + + /*Decrement yCounts by 2 since we already have 2 descriptors setup*/ + yCounts -= 2; + + /*Enable DMA interrupt*/ + NVIC_EnableIRQ((IRQn_Type) SDIO_HOST_Write_Int_INTC_NUMBER); + } + + /*Initialize the channel with the first descriptor*/ + Cy_DMA_Channel_SetDescriptor(SDIO_HOST_Write_DMA_HW, SDIO_HOST_Write_DMA_DW_CHANNEL , &writeDesr0); + } +} + + +/******************************************************************************* +* Function Name: SDIO_SendCommandAndWait +****************************************************************************//** +* +* This function sends a command on the command channel and waits for that +* command to finish before returning. If a Command 53 is issued this function +* will handle all of the data transfer and wait to return until it is done. +* +* \param pstcCmd +* Pointer command configuration structure see \ref stc_sdio_cmd_t. +* +* \return +* \ref en_sdio_result_t +* +*******************************************************************************/ +en_sdio_result_t SDIO_SendCommandAndWait(stc_sdio_cmd_t *pstcCmd) +{ + /* Store the command and data configurations*/ + stc_sdio_cmd_config_t stcCmdConfig; + stc_sdio_data_config_t stcDataConfig; + + uint32_t u32CmdTimeout = 0; + + /*Returns from various function calls*/ + en_sdio_result_t enRet = Error; + en_sdio_result_t enRetTmp = Ok; + + /* Hold value of if these checks are needed */ + uint8_t bCmdIndexCheck; + uint8_t bCmdCrcCheck; + static uint8_t u8responseBuf[6]; + + /* Clear statuses */ + gstcInternalData.stcEvents.u8CmdComplete = 0; + gstcInternalData.stcEvents.u8TransComplete = 0; + gstcInternalData.stcEvents.u8CRCError = 0; + + /* Setup the command configuration */ + stcCmdConfig.u8CmdIndex = (uint8_t)pstcCmd->u32CmdIdx; + stcCmdConfig.u32Argument = pstcCmd->u32Arg; + +#ifdef CY_RTOS_AWARE + + cy_rslt_t result; + + /* Initialize the semaphore. This is not done in init because init is called + * in interrupt thread. cy_rtos_init_semaphore call is prohibited in + * interrupt thread. + */ + if(!sema_initialized) + { + cy_rtos_init_semaphore( &sdio_transfer_finished_semaphore, 1, 0 ); + sema_initialized = true; + } +#else + + /* Variable used for holding timeout value */ + uint32_t u32Timeout = 0; +#endif + + /*Determine the type of response and if we need to do any checks*/ + /*Command 0 and 8 have no response, so don't wait for one*/ + if (pstcCmd->u32CmdIdx == 0 || pstcCmd->u32CmdIdx == 8) + { + bCmdIndexCheck = false; + bCmdCrcCheck = false; + stcCmdConfig.bResponseRequired = false; + stcCmdConfig.pu8ResponseBuf = NULL; + } + + /*Command 5's response doesn't have a CRC or index, so don't check*/ + else if (pstcCmd->u32CmdIdx == 5) + { + bCmdIndexCheck = false; + bCmdCrcCheck = false; + stcCmdConfig.bResponseRequired = true; + stcCmdConfig.pu8ResponseBuf = u8responseBuf; + } + /*Otherwise check everything*/ + else + { + bCmdIndexCheck = true; + bCmdCrcCheck = true; + stcCmdConfig.bResponseRequired = true; + stcCmdConfig.pu8ResponseBuf = u8responseBuf; + } + + /*Check if the command is 53, if it is then setup the data transfer*/ + if (pstcCmd->u32CmdIdx == 53) + { + /*Set the number of blocks in the global struct*/ + stcDataConfig.u16BlockCount = (uint16_t)pstcCmd->u16BlockCnt; + /*Set the size of the data transfer*/ + stcDataConfig.u16BlockSize = (uint16_t)pstcCmd->u16BlockSize; + /*Set the direction are we reading or writing*/ + stcDataConfig.bRead = pstcCmd->bRead; + /*Set the pointer for the data*/ + stcDataConfig.pu8Data = pstcCmd->pu8Data; + + /*Get the data Transfer Ready*/ + SDIO_InitDataTransfer(&stcDataConfig); + + /*Set bit saying this was a CMD_53*/ + SDIO_CONTROL_REG |= SDIO_CTRL_ENABLE_INT; + } + + /*Send the command*/ + SDIO_SendCommand(&stcCmdConfig); + + /*Wait for the command to finish*/ + do + { + u32CmdTimeout++; + enRetTmp = SDIO_CheckForEvent(SdCmdEventCmdDone); + + } while ((enRetTmp != Ok) && (u32CmdTimeout < SDIO_CMD_TIMEOUT)); + + + if (u32CmdTimeout == SDIO_CMD_TIMEOUT) + { + enRet |= CMDTimeout; + } + else /*CMD Passed*/ + { + /*If a response is expected check it*/ + if (stcCmdConfig.bResponseRequired == true) + { + enRetTmp = SDIO_GetResponse(bCmdCrcCheck, bCmdIndexCheck, (uint8_t)pstcCmd->u32CmdIdx, pstcCmd->pu32Response, u8responseBuf); + if (enRetTmp != Ok) + { + enRet |= enRetTmp; + } + else /*Response good*/ + { + /*if it was command 53, check the response to ensure there was no error*/ + if ((pstcCmd->u32CmdIdx) == 53) + { + /*Make sure none of the error bits are set*/ + if (*(pstcCmd->pu32Response) & 0x0000cf00) + { + enRet |= ResponseFlagError; + } + else /*CMD53 Response good*/ + { + /*If it was command 53 and it was a write enable the write*/ + if (pstcCmd->bRead == false && enRet == Error) + { + Cy_DMA_Channel_Disable(SDIO_HOST_Resp_DMA_HW, SDIO_HOST_Resp_DMA_DW_CHANNEL ); + Cy_DMA_Channel_Disable(SDIO_HOST_CMD_DMA_HW, SDIO_HOST_CMD_DMA_DW_CHANNEL ); + Cy_DMA_Channel_Disable(SDIO_HOST_Read_DMA_HW, SDIO_HOST_Read_DMA_DW_CHANNEL ); + + /*Set the flag in the control register to enable the write*/ + Cy_DMA_Channel_Enable(SDIO_HOST_Write_DMA_HW, SDIO_HOST_Write_DMA_DW_CHANNEL); + /*Enable the channel*/ + Cy_SysLib_DelayCycles(35); + SDIO_CONTROL_REG |= SDIO_CTRL_ENABLE_WRITE; + } + + #ifdef CY_RTOS_AWARE + /* Wait for the transfer to finish. + * Acquire semaphore and wait until it will be released + * in SDIO_IRQ: + * 1. sdio_transfer_finished_semaphore count is equal to + * zero. cy_rtos_get_semaphore waits until semaphore + * count is increased by cy_rtos_set_semaphore() in + * SDIO_IRQ. + * 2. The cy_rtos_set_semaphore() increases + * sdio_transfer_finished_semaphore count. + * 3. The cy_rtos_get_semaphore() function decreases + * sdio_transfer_finished_semaphore back to zero + * and exit. Or timeout occurs + */ + result = cy_rtos_get_semaphore( &sdio_transfer_finished_semaphore, 10, false ); + + enRetTmp = SDIO_CheckForEvent(SdCmdEventTransferDone); + + if (result != CY_RSLT_SUCCESS) + #else + /* Wait for the transfer to finish */ + do + { + u32Timeout++; + enRetTmp = SDIO_CheckForEvent(SdCmdEventTransferDone); + + } while (!((enRetTmp == Ok) || (enRetTmp == DataCrcError) || (u32Timeout >= SDIO_DAT_TIMEOUT))); + + if (u32Timeout == SDIO_DAT_TIMEOUT) + #endif + { + enRet |= DataTimeout; + } + + /* if it was a read it is possible there is still extra data hanging out, trigger the + DMA again. This can result in extra data being transfered so the read buffer should be + 3 bytes bigger than needed*/ + if (pstcCmd->bRead == true) + { + Cy_TrigMux_SwTrigger((uint32_t)SDIO_HOST_Read_DMA_DW__TR_IN, 2); + } + + if (enRetTmp == DataCrcError) + { + enRet |= DataCrcError; + } + }/*CMD53 response good*/ + }/*Not a CMD53*/ + } /*Response Good*/ + } /*No Response Required, thus no CMD53*/ + } /*CMD Passed*/ + +#ifndef CY_RTOS_AWARE + u32Timeout = 0; +#endif + + /*If there were no errors then indicate transfer was okay*/ + if (enRet == Error) + { + enRet = Ok; + } + + /*reset CmdTimeout value*/ + u32CmdTimeout = 0; + + /*Always Reset on exit to clean up*/ + Cy_DMA_Channel_Disable(SDIO_HOST_Resp_DMA_HW, SDIO_HOST_Resp_DMA_DW_CHANNEL ); + Cy_DMA_Channel_Disable(SDIO_HOST_CMD_DMA_HW, SDIO_HOST_CMD_DMA_DW_CHANNEL ); + Cy_DMA_Channel_Disable(SDIO_HOST_Write_DMA_HW, SDIO_HOST_Write_DMA_DW_CHANNEL ); + Cy_DMA_Channel_Disable(SDIO_HOST_Read_DMA_HW, SDIO_HOST_Read_DMA_DW_CHANNEL ); + /*No longer a CMD_53*/ + SDIO_CONTROL_REG &= ~(SDIO_CTRL_ENABLE_INT | SDIO_CTRL_ENABLE_WRITE | SDIO_CTRL_ENABLE_READ); + SDIO_Reset(); + + return enRet; +} + + +/******************************************************************************* +* Function Name: SDIO_CheckForEvent +****************************************************************************//** +* +* Checks to see if a specific event has occurred such a command complete or +* transfer complete. +* +* \param enEventType +* The type of event to check for. See \ref en_sdio_event_t. +* +* \return +* \ref en_sdio_result_t +* +*******************************************************************************/ +en_sdio_result_t SDIO_CheckForEvent(en_sdio_event_t enEventType) +{ + en_sdio_result_t enRet = Error; + + /*Disable Interrupts while modifying the global*/ + NVIC_DisableIRQ((IRQn_Type) SDIO_HOST_sdio_int__INTC_NUMBER); + + /*Switch the event to check*/ + switch ( enEventType ) + { + /*If the command is done clear the flag*/ + case SdCmdEventCmdDone: + if (gstcInternalData.stcEvents.u8CmdComplete > 0) + { + gstcInternalData.stcEvents.u8CmdComplete = 0; + enRet = Ok; + } + break; + + /*If the transfer is done check for CRC Error and clear the flag*/ + case SdCmdEventTransferDone: + if (gstcInternalData.stcEvents.u8TransComplete > 0) + { + gstcInternalData.stcEvents.u8TransComplete = 0; + enRet = Ok; + } + /*Check for CRC error and set flags*/ + if (gstcInternalData.stcEvents.u8CRCError > 0) + { + enRet = DataCrcError; + gstcInternalData.stcEvents.u8CRCError = 0; + } + break; + } + + /*Re-enable Interrupts*/ + NVIC_EnableIRQ((IRQn_Type) SDIO_HOST_sdio_int__INTC_NUMBER); + return enRet; +} + + +/******************************************************************************* +* Function Name: SDIO_CalculateCrc7 +****************************************************************************//** +* +* Calculate the 7 bit CRC for the command channel +* +* \param pu8Data +* Data to calculate CRC on +* +* \param u8Size +* Number of bytes to calculate CRC on +* +* \return +* CRC +* +* \note +* This code was copied from +* http://www.barrgroup.com/Embedded-Systems/How-To/CRC-Calculation-C-Code +* +*******************************************************************************/ +uint8_t SDIO_CalculateCrc7(uint8_t* pu8Data, uint8_t u8Size) +{ + uint8_t data; + uint8_t remainder = 0; + uint32_t byte; + + for(byte = 0; byte < u8Size; ++byte) + { + data = pu8Data[byte] ^ remainder; + remainder = crcTable[data] ^ (remainder << 8); + } + + return (remainder>>1); +} + + +/******************************************************************************* +* Function Name: SDIO_Crc7Init +****************************************************************************//** +* +* Initialize 7-bit CRC Table +* +* \note +* This code was copied from +* http://www.barrgroup.com/Embedded-Systems/How-To/CRC-Calculation-C-Code +* +*******************************************************************************/ +void SDIO_Crc7Init(void) +{ + uint8_t remainder; + uint8_t bit; + uint32_t dividend; + + for(dividend = 0; dividend < 256; ++dividend) + { + remainder = dividend; + + for(bit = 8; bit > 0; --bit) + { + if (remainder & SDIO_CRC_UPPER_BIT) + { + remainder = (remainder << 1) ^ SDIO_CRC7_POLY; + } + else + { + remainder = (remainder << 1); + } + } + + crcTable[dividend] = (remainder); + } +} + + +/******************************************************************************* +* Function Name: SDIO_SetBlockSize +****************************************************************************//** +* +* Sets the size of each block +* +* \param u8ByteCount +* Size of the block +* +*******************************************************************************/ +void SDIO_SetBlockSize(uint8_t u8ByteCount) +{ + SDIO_BYTE_COUNT_REG = u8ByteCount; +} + + +/******************************************************************************* +* Function Name: SDIO_SetNumBlocks +****************************************************************************//** +* +* Sets the number of blocks to send +* +* \param u8BlockCount +* Size of the block +* +*******************************************************************************/ +void SDIO_SetNumBlocks(uint8_t u8BlockCount) +{ + SDIO_DATA_BLOCK_COUNTER_A0_REG = u8BlockCount; + SDIO_DATA_BLOCK_COUNTER_D0_REG = u8BlockCount; + /*The one is used so that we can do 256 bytes*/ + SDIO_DATA_BLOCK_COUNTER_A1_REG = 1; + SDIO_DATA_BLOCK_COUNTER_D1_REG = 1; +} + + +/******************************************************************************* +* Function Name: SDIO_EnableIntClock +****************************************************************************//** +* +* Enable Internal clock for the block +* +*******************************************************************************/ +void SDIO_EnableIntClock(void) +{ + SDIO_CONTROL_REG |= SDIO_CTRL_INT_CLK; + Cy_SysClk_PeriphEnableDivider(SDIO_HOST_Internal_Clock_DIV_TYPE, SDIO_HOST_Internal_Clock_DIV_NUM); +} + + +/******************************************************************************* +* Function Name: SDIO_DisableIntClock +****************************************************************************//** +* +* Enable Disable clock for the block +* +*******************************************************************************/ +void SDIO_DisableIntClock(void) +{ + SDIO_CONTROL_REG &= ~SDIO_CTRL_INT_CLK; + Cy_SysClk_PeriphDisableDivider(SDIO_HOST_Internal_Clock_DIV_TYPE, SDIO_HOST_Internal_Clock_DIV_NUM); +} + + +/******************************************************************************* +* Function Name: SDIO_EnableSdClk +****************************************************************************//** +* +* Enable SD Clock out to pin +* +*******************************************************************************/ +void SDIO_EnableSdClk(void) +{ + SDIO_CONTROL_REG |= SDIO_CTRL_SD_CLK; +} + + +/******************************************************************************* +* Function Name: SDIO_DisableSdClk +****************************************************************************//** +* +* Disable SD Clock out to the pin +* +*******************************************************************************/ +void SDIO_DisableSdClk(void) +{ + SDIO_CONTROL_REG &= ~SDIO_CTRL_SD_CLK; +} + + +/******************************************************************************* +* Function Name: SDIO_SetSdClkFrequency +****************************************************************************//** +* +* Sets the frequency of the SD Clock +* +* \param u32SdClkFreqHz +* Frequency of SD Clock in Hz. +* +* \note +* Only an integer divider is used, so the desired frequency may not be meet +*******************************************************************************/ +void SDIO_SetSdClkFrequency(uint32_t u32SdClkFreqHz) +{ + uint16_t u16Div; + u16Div = Cy_SysClk_ClkPeriGetFrequency() / u32SdClkFreqHz; + Cy_SysClk_PeriphSetDivider(SDIO_HOST_Internal_Clock_DIV_TYPE, SDIO_HOST_Internal_Clock_DIV_NUM, (u16Div-1)); +} + + +/******************************************************************************* +* Function Name: SDIO_SetupDMA +****************************************************************************//** +* +* Configures the DMA for the SDIO block +* +*******************************************************************************/ +void SDIO_SetupDMA(void) +{ + /*Set the number of bytes to send*/ + SDIO_HOST_CMD_DMA_CMD_DMA_Desc_config.xCount = (SDIO_NUM_RESP_BYTES - 1); + /*Set the destination address*/ + SDIO_HOST_CMD_DMA_CMD_DMA_Desc_config.dstAddress = (void*)SDIO_CMD_COMMAND_PTR; + + /*Initialize descriptor for cmd channel*/ + Cy_DMA_Descriptor_Init(&cmdDesr, &SDIO_HOST_CMD_DMA_CMD_DMA_Desc_config); + + /*Set flag to disable descriptor when done*/ + cmdDesr.ctl |= 0x01000000; + + /*Configure channel*/ + /*CMD channel can be preempted, and has lower priority*/ + cmdChannelConfig.descriptor = &cmdDesr; + cmdChannelConfig.preemptable = 1; + cmdChannelConfig.priority = 1; + cmdChannelConfig.enable = 0u; + + /*Configure Channel with initial Settings*/ + Cy_DMA_Channel_Init(SDIO_HOST_CMD_DMA_HW, SDIO_HOST_CMD_DMA_DW_CHANNEL, &cmdChannelConfig); + + /*Enable DMA block*/ + Cy_DMA_Enable(SDIO_HOST_CMD_DMA_HW); + + /*Set the number of bytes to receive*/ + SDIO_HOST_Resp_DMA_Resp_DMA_Desc_config.xCount = SDIO_NUM_RESP_BYTES; + /*Set the source address*/ + SDIO_HOST_Resp_DMA_Resp_DMA_Desc_config.srcAddress = (void*)SDIO_CMD_RESPONSE_PTR; + + /*Initialize descriptor for response channel*/ + Cy_DMA_Descriptor_Init(&respDesr, &SDIO_HOST_Resp_DMA_Resp_DMA_Desc_config); + + /*Set flag to disable descriptor when done*/ + respDesr.ctl |= 0x01000000; + + /*Configure channel*/ + /*response channel can be preempted, and has lower priority*/ + respChannelConfig.descriptor = &respDesr; + respChannelConfig.preemptable = 1; + respChannelConfig.priority = 1; + respChannelConfig.enable = 0u; + + /*Configure Channel with initial Settings*/ + Cy_DMA_Channel_Init(SDIO_HOST_Resp_DMA_HW, SDIO_HOST_Resp_DMA_DW_CHANNEL, &respChannelConfig); + /*Enable DMA block*/ + Cy_DMA_Enable(SDIO_HOST_Resp_DMA_HW); + + /*Set the destination address*/ + SDIO_HOST_Write_DMA_Write_DMA_Desc_config.dstAddress = (void*)SDIO_DAT_WRITE_PTR; + + /*Initialize descriptor for write channel*/ + Cy_DMA_Descriptor_Init(&writeDesr0, &SDIO_HOST_Write_DMA_Write_DMA_Desc_config); + Cy_DMA_Descriptor_Init(&writeDesr1, &SDIO_HOST_Write_DMA_Write_DMA_Desc_config); + + /*Configure channel*/ + /*write channel cannot be preempted, and has highest priority*/ + writeChannelConfig.descriptor = &writeDesr0; + writeChannelConfig.preemptable = 0; + writeChannelConfig.priority = 0; + writeChannelConfig.enable = 0u; + + /*Configure Channel with initial Settings*/ + Cy_DMA_Channel_Init(SDIO_HOST_Write_DMA_HW, SDIO_HOST_Write_DMA_DW_CHANNEL, &writeChannelConfig); + + /*Enable the interrupt*/ + Cy_DMA_Channel_SetInterruptMask(SDIO_HOST_Write_DMA_HW, SDIO_HOST_Write_DMA_DW_CHANNEL,CY_DMA_INTR_MASK); + + /*Enable DMA block*/ + Cy_DMA_Enable(SDIO_HOST_Write_DMA_HW); + + /*Set the source address*/ + SDIO_HOST_Read_DMA_Read_DMA_Desc_config.srcAddress = (void*)SDIO_DAT_READ_PTR; + /*Initialize descriptor for read channel*/ + Cy_DMA_Descriptor_Init(&readDesr0, &SDIO_HOST_Read_DMA_Read_DMA_Desc_config); + Cy_DMA_Descriptor_Init(&readDesr1, &SDIO_HOST_Read_DMA_Read_DMA_Desc_config); + + /*Configure channel*/ + /*read channel cannot be preempted, and has highest priority*/ + readChannelConfig.descriptor = &readDesr0; + readChannelConfig.preemptable = 0; + readChannelConfig.priority = 0; + readChannelConfig.enable = 0u; + + /*Configure Channel with initial Settings*/ + Cy_DMA_Channel_Init(SDIO_HOST_Read_DMA_HW, SDIO_HOST_Read_DMA_DW_CHANNEL, &readChannelConfig); + + /*Enable the interrupt*/ + Cy_DMA_Channel_SetInterruptMask(SDIO_HOST_Read_DMA_HW, SDIO_HOST_Read_DMA_DW_CHANNEL,CY_DMA_INTR_MASK); + + /*Enable DMA block*/ + Cy_DMA_Enable(SDIO_HOST_Read_DMA_HW); +} + + +/******************************************************************************* +* Function Name: SDIO_Reset +****************************************************************************//** +* +* Reset the SDIO interface +* +*******************************************************************************/ +void SDIO_Reset(void) +{ + /*Control register is in pulse mode, so this just pulses the reset*/ + SDIO_CONTROL_REG |= (SDIO_CTRL_RESET_DP); +} + + +/******************************************************************************* +* Function Name: SDIO_EnableChipInt +****************************************************************************//** +* +* Enables the SDIO Chip Int by setting the mask bit +* +*******************************************************************************/ +void SDIO_EnableChipInt(void) +{ + SDIO_STATUS_INT_MSK |= SDIO_STS_CARD_INT; +} + + +/******************************************************************************* +* Function Name: SDIO_DisableChipInt +****************************************************************************//** +* +* Enables the SDIO Chip Int by setting the mask bit +* +*******************************************************************************/ +void SDIO_DisableChipInt(void) +{ + SDIO_STATUS_INT_MSK &= ~SDIO_STS_CARD_INT; +} + + +/******************************************************************************* +* Function Name: SDIO_IRQ +****************************************************************************//** +* +* SDIO interrupt, checks for events, and calls callbacks +* +*******************************************************************************/ +void SDIO_IRQ(void) +{ + uint8_t u8Status; + + /* First read the status register */ + u8Status = SDIO_STATUS_REG; + + /* Check card interrupt */ + if (u8Status & SDIO_STS_CARD_INT ) + { + pfnCardInt_count++; + } + + /* Execute card interrupt callback if neccesary */ + if (0 != pfnCardInt_count) + { + if (NULL != gstcInternalData.pstcCallBacks.pfnCardIntCb) + { + gstcInternalData.pstcCallBacks.pfnCardIntCb(); + } + pfnCardInt_count--; + } + + /* If the command is complete set the flag */ + if (u8Status & SDIO_STS_CMD_DONE) + { + gstcInternalData.stcEvents.u8CmdComplete++; + } + + /* Check if a write is complete */ + if (u8Status & SDIO_STS_WRITE_DONE ) + { + + /* Clear the Write flag and CMD53 flag */ + SDIO_CONTROL_REG &= ~(SDIO_CTRL_ENABLE_WRITE | SDIO_CTRL_ENABLE_INT); + + /* Check if the CRC status return was bad */ + if (u8Status & SDIO_STS_CRC_ERR) + { + /* CRC was bad, set the flag */ + gstcInternalData.stcEvents.u8CRCError++; + } + + /* Set the done flag */ + + #ifdef CY_RTOS_AWARE + cy_rtos_set_semaphore( &sdio_transfer_finished_semaphore, true ); + #else + gstcInternalData.stcEvents.u8TransComplete++; + #endif + } + + /* Check if a read is complete */ + if (u8Status & SDIO_STS_READ_DONE) + { + /* Clear the read flag */ + SDIO_CONTROL_REG &= ~(SDIO_CTRL_ENABLE_READ| SDIO_CTRL_ENABLE_INT); + + /* Check the CRC */ + if (u8Status & SDIO_STS_CRC_ERR) + { + /* CRC was bad, set the flag */ + gstcInternalData.stcEvents.u8CRCError++; + } + /* Okay we're done so set the done flag */ + #ifdef CY_RTOS_AWARE + cy_rtos_set_semaphore( &sdio_transfer_finished_semaphore, true ); + #else + gstcInternalData.stcEvents.u8TransComplete++; + #endif + } + + NVIC_ClearPendingIRQ((IRQn_Type) SDIO_HOST_sdio_int__INTC_NUMBER); +} + + +/******************************************************************************* +* Function Name: SDIO_READ_DMA_IRQ +****************************************************************************//** +* +* SDIO DMA Read interrupt, checks counts and toggles to other descriptor if +* needed +* +*******************************************************************************/ +void SDIO_READ_DMA_IRQ(void) +{ + /*Shouldn't have to change anything unless it is the last descriptor*/ + + /*If the current descriptor is 0, then change descriptor 1*/ + if (Cy_DMA_Channel_GetCurrentDescriptor(SDIO_HOST_Read_DMA_HW, SDIO_HOST_Read_DMA_DW_CHANNEL) == &readDesr0) + { + /*We need to increment the destination address every time*/ + readDesr1.dst += 2048; + + /*If this is the last descriptor*/ + if ((yCounts == 1) && (yCountRemainder == 0)) + { + /* In this case all we need to change is the next descriptor and disable*/ + readDesr1.nextPtr = 0; + readDesr1.ctl |= 0x01000000; + NVIC_DisableIRQ((IRQn_Type) SDIO_HOST_Read_Int_INTC_NUMBER); + } + else if (yCounts == 0 && (yCountRemainder > 0)) + { + /*change next descriptor, and disable*/ + readDesr1.nextPtr = 0; + readDesr1.ctl |= 0x01000000; + /*Also change the yCount*/ + readDesr1.yCtl = _VAL2FLD(CY_DMA_CTL_COUNT, (yCountRemainder-1)) | + _VAL2FLD(CY_DMA_CTL_DST_INCR, 2); + NVIC_DisableIRQ((IRQn_Type) SDIO_HOST_Read_Int_INTC_NUMBER); + } + } + + /*If the current descriptor is 1, then change descriptor 0*/ + if (Cy_DMA_Channel_GetCurrentDescriptor(SDIO_HOST_Read_DMA_HW, SDIO_HOST_Read_DMA_DW_CHANNEL) == &readDesr1) + { + /*We need to increment the destination address everytime*/ + readDesr0.dst += 2048; + + /*If this is the last descriptor*/ + if ((yCounts == 1) && (yCountRemainder == 0)) + { + /* In this case all we need to change is the next descriptor and disable*/ + readDesr0.nextPtr = 0; + readDesr0.ctl |= 0x01000000; + NVIC_DisableIRQ((IRQn_Type) SDIO_HOST_Read_Int_INTC_NUMBER); + } + else if (yCounts == 0 && (yCountRemainder > 0)) + { + /*change next descriptor, and disable*/ + readDesr0.nextPtr = 0; + readDesr0.ctl |= 0x01000000; + /*Also change the yCount*/ + readDesr0.yCtl = _VAL2FLD(CY_DMA_CTL_COUNT, (yCountRemainder-1)) | + _VAL2FLD(CY_DMA_CTL_DST_INCR, 2); + NVIC_DisableIRQ((IRQn_Type) SDIO_HOST_Read_Int_INTC_NUMBER); + } + } + + /*Clear the interrupt*/ + Cy_DMA_Channel_ClearInterrupt(SDIO_HOST_Read_DMA_HW, SDIO_HOST_Read_DMA_DW_CHANNEL); + /*decrement y counts*/ + yCounts--; +} + +/******************************************************************************* +* Function Name: SDIO_WRITE_DMA_IRQ +****************************************************************************//** +* +* SDIO DMA Write interrupt, checks counts and toggles to other descriptor if +* needed +* +*******************************************************************************/ +void SDIO_WRITE_DMA_IRQ(void) +{ + /*We shouldn't have to change anything unless it is the last descriptor*/ + + /*If the current descriptor is 0, then change descriptor 1*/ + if (Cy_DMA_Channel_GetCurrentDescriptor(SDIO_HOST_Write_DMA_HW, SDIO_HOST_Write_DMA_DW_CHANNEL) == &writeDesr0) + { + /*We also need to increment the destination address every-time*/ + writeDesr1.src += 2048; + + /*If this is the last descriptor*/ + if ((yCounts == 1) && (yCountRemainder == 0)) + { + /* In this case all we need to change is the next descriptor and disable*/ + writeDesr1.nextPtr = 0; + writeDesr1.ctl |= 0x01000000; + NVIC_DisableIRQ((IRQn_Type) SDIO_HOST_Write_Int_INTC_NUMBER); + + } + else if (yCounts == 0 && (yCountRemainder > 0)) + { + /*change next descriptor, and disable*/ + writeDesr1.nextPtr = 0; + writeDesr1.ctl |= 0x01000000; + /*Also change the yCount*/ + writeDesr1.yCtl = _VAL2FLD(CY_DMA_CTL_COUNT, (yCountRemainder -1)) | + _VAL2FLD(CY_DMA_CTL_SRC_INCR, 2); + NVIC_DisableIRQ((IRQn_Type) SDIO_HOST_Write_Int_INTC_NUMBER); + } + } + + /*If the current descriptor is 1, then change descriptor 0*/ + if (Cy_DMA_Channel_GetCurrentDescriptor(SDIO_HOST_Write_DMA_HW, SDIO_HOST_Write_DMA_DW_CHANNEL) == &writeDesr1) + { + /*We also need to increment the destination address*/ + writeDesr0.src += 2048; + /*If this is the last descriptor*/ + if ((yCounts == 1) && (yCountRemainder == 0)) + { + /* In this case all we need to change is the next descriptor and disable*/ + writeDesr0.nextPtr = 0; + writeDesr0.ctl |= 0x01000000; + NVIC_DisableIRQ((IRQn_Type) SDIO_HOST_Write_Int_INTC_NUMBER); + } + else if (yCounts == 0 && (yCountRemainder > 0)) + { + /*change next descriptor, and disable*/ + writeDesr0.nextPtr = 0; + writeDesr0.ctl |= 0x01000000; + /*Also change the yCount*/ + writeDesr0.yCtl = _VAL2FLD(CY_DMA_CTL_COUNT, (yCountRemainder -1)) | + _VAL2FLD(CY_DMA_CTL_SRC_INCR, 2); + NVIC_DisableIRQ((IRQn_Type) SDIO_HOST_Write_Int_INTC_NUMBER); + } + } + + /*Clear the interrupt*/ + Cy_DMA_Channel_ClearInterrupt(SDIO_HOST_Write_DMA_HW, SDIO_HOST_Write_DMA_DW_CHANNEL); + yCounts--; +} + +/******************************************************************************* +* Function Name: SDIO_Free +****************************************************************************//** +* +* Frees any system resources that were allocated by the SDIO driver. +* +*******************************************************************************/ +void SDIO_Free(void) +{ +#ifdef CY_RTOS_AWARE + cy_rtos_deinit_semaphore(&sdio_transfer_finished_semaphore); +#endif +} + +/******************************************************************************* +* Function Name: SDIO_SaveConfig +******************************************************************************** +* +* Saves the user configuration of the SDIO UDB non-retention registers. Call the +* SDIO_SaveConfig() function before the Cy_SysPm_CpuEnterDeepSleep() function. +* +*******************************************************************************/ +static void SDIO_SaveConfig(void) +{ + regs.CY_SDIO_UDB_WRKMULT_CTL_0 = UDB->WRKMULT.CTL[0]; + regs.CY_SDIO_UDB_WRKMULT_CTL_1 = UDB->WRKMULT.CTL[1]; + regs.CY_SDIO_UDB_WRKMULT_CTL_2 = UDB->WRKMULT.CTL[2]; + regs.CY_SDIO_UDB_WRKMULT_CTL_3 = UDB->WRKMULT.CTL[3]; +} + + +/******************************************************************************* +* Function Name: SDIO_RestoreConfig +******************************************************************************** +* +* Restores the user configuration of the SDIO UDB non-retention registers. Call +* the SDIO_Wakeup() function after the Cy_SysPm_CpuEnterDeepSleep() function. +* +*******************************************************************************/ +static void SDIO_RestoreConfig(void) +{ + UDB->WRKMULT.CTL[0] = regs.CY_SDIO_UDB_WRKMULT_CTL_0; + UDB->WRKMULT.CTL[1] = regs.CY_SDIO_UDB_WRKMULT_CTL_1; + UDB->WRKMULT.CTL[2] = regs.CY_SDIO_UDB_WRKMULT_CTL_2; + UDB->WRKMULT.CTL[3] = regs.CY_SDIO_UDB_WRKMULT_CTL_3; +} + +#if defined(__cplusplus) +} +#endif + +/* [] END OF FILE */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/SDIO_HOST/SDIO_HOST.h b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/SDIO_HOST/SDIO_HOST.h new file mode 100644 index 00000000000..b821eb9a461 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/SDIO_HOST/SDIO_HOST.h @@ -0,0 +1,396 @@ +/***************************************************************************//** +* \file SDIO_HOST.h +* +* \brief +* This file provides types definition, constants and function definition for +* the SDIO driver. +* +******************************************************************************** +* \copyright +* Copyright 2016-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*******************************************************************************/ + +/** +* \defgroup group_bsp_pin_state Pin States +* \defgroup group_bsp_pins Pin Mappings +* \defgroup group_bsp_macros Macros +* \defgroup group_bsp_functions Functions +* +* \defgroup group_udb_sdio UDB_SDIO +* \{ +* SDIO - Secure Digital Input Output is a standard for communicating with various + external devices such as Wifi and bluetooth devices. +*

+* The driver is currently designed to only support communication with certain +* Cypress Wifi and Bluetooth chipsets, it is not designed to work with a general +* SDIO card, or even and SD card. It is only intended to be used by the WiFi +* driver for communication. +*

+* This is not intended to be used as a general purpose API. +* +* \section group_udb_sdio_section_configuration_considerations Configuration Considerations +* Features: +* * Always Four Wire Mode +* * Supports Card Interrupt +* * Uses DMA for command and data transfer +* +* \defgroup group_udb_sdio_macros Macros +* \defgroup group_udb_sdio_functions Functions +* \defgroup group_udb_sdio_data_structures Data Structures +*/ + +#if !defined(CY_SDIO_H) +#define CY_SDIO_H + +#include "SDIO_HOST_cfg.h" + +#if defined(__cplusplus) +extern "C" { +#endif + + +/*************************************** +* API Constants +***************************************/ + +/** +* \addtogroup group_udb_sdio_macros +* \{ +*/ + +#define SDIO_CMD_TIMEOUT (100000u) /**< Value used for firmware timeout*/ +#define SDIO_DAT_TIMEOUT (500000u) /**< Value used for firmware timeout*/ +#define SDIO_SRC_CLK_FREQ_HZ (10000000u) /**< Frequency of CLK_PERI*/ +#define SDIO_ENABLE_CNT (0x20u) /**< Bit to set in Aux Ctrl reg to enable 7 bit counters.*/ + +/*! +\defgroup group_sdio_cmd_constants Constants for the command channel +*/ +/* @{*/ +#define SDIO_HOST_DIR (0x40u) /**< Direction bit set in command */ +#define SDIO_CMD_END_BIT (0x01u) /**< End bit set in command*/ +#define SDIO_NUM_CMD_BYTES (6u) /**< Number of command bytes to send*/ +#define SDIO_NUM_RESP_BYTES (6u) /**< Number of response bytes to receive*/ +/*@} group_sdio_cmd_constants */ + +/*! +\defgroup group_sdio_ctrl_reg SDIO control register bits +*/ +/* @{*/ +#define SDIO_CTRL_INT_CLK (0x01u) /**< Enable the internal clock running the SDIO block*/ +#define SDIO_CTRL_SD_CLK (0x02u) /**< Enable the the SD Clock*/ +#define SDIO_CTRL_ENABLE_WRITE (0x04u) /**< Enable a write, should not be set if ENABLE_READ is set*/ +#define SDIO_CTRL_ENABLE_READ (0x08u) /**< Enable a read, should not be set if ENABLE_WRITE is set*/ +#define SDIO_CTRL_SKIP_RESPONSE (0x10u) /**< If set no response is required for the command*/ +#define SDIO_CTRL_RESET (0x20u) /**< If set the SDIO interface is reset*/ +#define SDIO_CTRL_RESET_DP (0x40u) /**< If set the SDIO interface is reset*/ +#define SDIO_CTRL_ENABLE_INT (0x80u) /**< Enables logic to detect card interrupt*/ +/*@} group_sdio_ctrl_reg */ + +/*! +\defgroup group_sdio_status_reg SDIO status register bits +*/ +/* @{*/ +#define SDIO_STS_CMD_DONE (0x01u) /**< The command is done*/ +#define SDIO_STS_WRITE_DONE (0x02u) /**< All data for a write has been sent*/ +#define SDIO_STS_READ_DONE (0x04u) /**< All data for a read has been read*/ +#define SDIO_STS_CRC_ERR (0x08u) /**< A CRC error was detected during a read or write*/ +#define SDIO_STS_CMD_IDLE (0x10u) /**< The command channel is idle*/ +#define SDIO_STS_DAT_IDLE (0x20u) /**< The data channel is idle*/ +#define SDIO_STS_CARD_INT (0x40u) /**< The SDIO card indicated an interrupt by driving DAT[1] low*/ +/*@} group_sdio_status_reg */ + +/*! +\defgroup group_sdio_crc Constants for 7bit CRC for command +*/ +/* @{*/ +#define SDIO_CRC7_POLY (0x12u) /**< Value of CRC polynomial*/ +#define SDIO_CRC_UPPER_BIT (0x80u) /**< Upper bit to test if it is high*/ +/*@} group_sdio_crc */ + +/** \} group_udb_sdio_macros */ + + +/*************************************** +* Type Definitions +***************************************/ + +/** +* \addtogroup group_udb_sdio_data_structures +* \{ +*/ + +/** +* Create a type for the card interrupt call back +*/ +typedef void (* sdio_card_int_cb_t)(void); + +/** +* \brief This enum is used when checking for specific events +*/ +typedef enum en_sdio_event +{ + SdCmdEventCmdDone = (1u), /**< Check to see if a command is done*/ + SdCmdEventTransferDone = (2u) /**< Check to see if a transfer is done*/ + +}en_sdio_event_t; + +/** +* \brief Used to indicate the result of a function +*/ +typedef enum en_sdio_result +{ + Ok = 0x00, /**< No error*/ + Error = 0x01, /**< Non-specific error code*/ + CommandCrcError = 0x02, /**< There was a CRC error on the Command/Response*/ + CommandIdxError = 0x04, /**< The index for the command didn't match*/ + CommandEndError = 0x08, /**< There was an end bit error on the command*/ + DataCrcError = 0x10, /**< There was a data CRC Error*/ + CMDTimeout = 0x20, /**< The command didn't finish before the timeout period was over*/ + DataTimeout = 0x40, /**< The data didn't finish before the timeout period was over*/ + ResponseFlagError = 0x80 /**< There was an error in the response flag for command 53*/ + +} en_sdio_result_t; + +/** +* \brief Flags used to indicate an event occurred, set in the interrupt, cleared in the check events function +*/ +typedef struct stc_sdcmd_event_flag +{ + uint8_t u8CmdComplete; /**< If non-zero a command has completed*/ + uint8_t u8TransComplete; /**< If non-zero a transfer has completed*/ + uint8_t u8CRCError; /**< If non-zero a CRC error was detected in a data transfer*/ + +}stc_sdio_event_flag_t; + +/** +* \brief Holds pointers to callback functions +*/ +typedef struct stc_sdio_irq_cb +{ + sdio_card_int_cb_t pfnCardIntCb; /**< Pointer to card interrupt callback function*/ +}stc_sdio_irq_cb_t; + +/** +* \brief Global structure used to hold data from interrupt and other functions +*/ +typedef struct stc_sdio_gInternalData +{ + stc_sdio_irq_cb_t pstcCallBacks; /**< Holds pointers to all the call back functions*/ + stc_sdio_event_flag_t stcEvents; /**< Holds all of the event count flags, set in interrupt used in check events*/ +}stc_sdio_gInternalData_t; + +/** +* \brief structure used for configuring command +*/ +typedef struct stc_sdio_cmd_config +{ + uint8_t u8CmdIndex; /**< Command index*/ + uint32_t u32Argument; /**< The argument of command */ + uint8_t bResponseRequired; /**< TRUE: A Response is required*/ + uint8_t *pu8ResponseBuf; /**< Pointer to location to store response*/ + +}stc_sdio_cmd_config_t; + +/** +* \brief structure used for the data channel +*/ +typedef struct stc_sdio_data_config +{ + uint8_t bRead; /**< TRUE: Read, FALSE: write*/ + uint16_t u16BlockSize; /**< Block size*/ + uint16_t u16BlockCount; /**< Holds the number of blocks to send*/ + uint8_t *pu8Data; /**< Pointer data buffer*/ + +}stc_sdio_data_config_t; + +/** +* \brief structure used for configuring command and data +*/ +typedef struct stc_sdio_cmd +{ + uint32_t u32CmdIdx; /**< Command index*/ + uint32_t u32Arg; /**< The argument of command*/ + uint32_t *pu32Response; /**< Pointer to location to store response*/ + uint8_t *pu8Data; /**< Pointer data buffer*/ + uint8_t bRead; /**< TRUE: Read, FALSE: write*/ + uint16_t u16BlockCnt; /**< Number of blocks to send*/ + uint16_t u16BlockSize; /**< Block size*/ +}stc_sdio_cmd_t; + +/** \} group_udb_sdio_data_structures */ + +/*************************************** +* Function Prototypes +***************************************/ + +/** +* \addtogroup group_udb_sdio_functions +* \{ +*/ + +/* Main functions*/ +void SDIO_Init(stc_sdio_irq_cb_t* pfuCb); +en_sdio_result_t SDIO_SendCommandAndWait(stc_sdio_cmd_t *pstcCmd); +void SDIO_EnableIntClock(void); +void SDIO_DisableIntClock(void); +void SDIO_EnableSdClk(void); +void SDIO_DisableSdClk(void); +void SDIO_SetSdClkFrequency(uint32_t u32SdClkFreqHz); +void SDIO_Reset(void); +void SDIO_EnableChipInt(void); +void SDIO_DisableChipInt(void); +void SDIO_Free(void); + +/*Low Level Functions*/ +void SDIO_SendCommand(stc_sdio_cmd_config_t *pstcCmdConfig); +en_sdio_result_t SDIO_GetResponse(uint8_t bCmdIndexCheck, uint8_t bCmdCrcCheck, uint8_t u8CmdIdx, uint32_t* pu32Response, uint8_t* pu8ResponseBuf); +void SDIO_InitDataTransfer(stc_sdio_data_config_t *pstcDataConfig); +en_sdio_result_t SDIO_CheckForEvent(en_sdio_event_t enEventType); +uint8_t SDIO_CalculateCrc7(uint8_t* pu8Data, uint8_t pu8Size); +void SDIO_SetBlockSize(uint8_t u8ByteCount); +void SDIO_SetNumBlocks(uint8_t u8BlockCount); + +/*DMA setup function*/ +void SDIO_SetupDMA(void); + +/*Interrupt Function*/ +void SDIO_IRQ(void); +void SDIO_READ_DMA_IRQ(void); +void SDIO_WRITE_DMA_IRQ(void); + +void SDIO_Crc7Init(void); + +cy_en_syspm_status_t SDIO_DeepSleepCallback(cy_stc_syspm_callback_params_t *params, cy_en_syspm_callback_mode_t mode); + +/** \endcond */ + +/** \} group_udb_sdio_functions */ + + +/*************************************** +* Hardware Registers +***************************************/ + +/** \cond INTERNAL */ + +#define SDIO_CONTROL_REG (* (reg8 *) \ +SDIO_HOST_bSDIO_CtrlReg__CONTROL_REG) + +#define SDIO_CONTROL_PTR ( (reg8 *) \ +SDIO_HOST_bSDIO_CtrlReg__CONTROL_REG) + +#define SDIO_STATUS_REG (* (reg8 *) \ +SDIO_HOST_bSDIO_StatusReg__STATUS_REG) + +#define SDIO_STATUS_PTR ( (reg8 *) \ +SDIO_HOST_bSDIO_StatusReg__STATUS_REG) + +#define SDIO_STATUS_INT_MSK (* (reg8*) \ +SDIO_HOST_bSDIO_StatusReg__MASK_REG) + +#define SDIO_STATUS_AUX_CTL (* (reg8 *) \ +SDIO_HOST_bSDIO_StatusReg__STATUS_AUX_CTL_REG) + +#define SDIO_CMD_BIT_CNT_CONTROL_REG (* (reg8 *) \ +SDIO_HOST_bSDIO_cmdBitCounter__CONTROL_AUX_CTL_REG) + +#define SDIO_CMD_BIT_CNT_CONTROL_PTR ( (reg8 *) \ +SDIO_HOST_bSDIO_cmdBitCounter__CONTROL_AUX_CTL_REG) + +#define SDIO_WRITE_CRC_CNT_CONTROL_REG (* (reg8 *) \ +SDIO_HOST_bSDIO_writeCrcCounter__CONTROL_AUX_CTL_REG) + +#define SDIO_WRITE_CRC_CNT_CONTROL_PTR ( (reg8 *) \ +SDIO_HOST_bSDIO_writeCrcCounter__CONTROL_AUX_CTL_REG) + +#define SDIO_BYTE_CNT_CONTROL_REG (* (reg8 *) \ +SDIO_HOST_bSDIO_byteCounter__CONTROL_AUX_CTL_REG) + +#define SDIO_BYTE_CNT_CONTROL_PTR ( (reg8 *) \ +SDIO_HOST_bSDIO_byteCounter__CONTROL_AUX_CTL_REG) + +#define SDIO_CRC_BIT_CNT_CONTROL_REG (* (reg8 *) \ +SDIO_HOST_bSDIO_crcBitCounter__CONTROL_AUX_CTL_REG) + +#define SDIO_CRC_BIT_CNT_CONTROL_PTR ( (reg8 *) \ +SDIO_HOST_bSDIO_crcBitCounter__CONTROL_AUX_CTL_REG) + +#define SDIO_DATA_BLOCK_COUNTER_A0_REG (* (reg8 *) \ +SDIO_HOST_bSDIO_blockCounter_u0__A0_REG) + +#define SDIO_DATA_BLOCK_COUNTER_A0_PTR ( (reg8 *) \ +SDIO_HOST_bSDIO_blockCounter_u0__A0_REG) + +#define SDIO_DATA_BLOCK_COUNTER_D0_REG (* (reg8 *) \ +SDIO_HOST_bSDIO_blockCounter_u0__D0_REG) + +#define SDIO_DATA_BLOCK_COUNTER_D0_PTR ( (reg8 *) \ +SDIO_HOST_bSDIO_blockCounter_u0__D0_REG) + +#define SDIO_DATA_BLOCK_COUNTER_A1_REG (* (reg8 *) \ +SDIO_HOST_bSDIO_blockCounter_u0__A1_REG) + +#define SDIO_DATA_BLOCK_COUNTER_A1_PTR ( (reg8 *) \ +SDIO_HOST_bSDIO_blockCounter_u0__A1_REG) + +#define SDIO_DATA_BLOCK_COUNTER_D1_REG (* (reg8 *) \ +SDIO_HOST_bSDIO_blockCounter_u0__D1_REG) + +#define SDIO_DATA_BLOCK_COUNTER_D1_PTR ( (reg8 *) \ +SDIO_HOST_bSDIO_blockCounter_u0__D1_REG) + +#define SDIO_CMD_COMMAND_REG (* (reg8 *) \ +SDIO_HOST_bSDIO_CMD__F0_REG) + +#define SDIO_CMD_COMMAND_A0_REG (* (reg8 *) \ +SDIO_HOST_bSDIO_CMD__A0_REG) + +#define SDIO_CMD_COMMAND_PTR ( (reg8 *) \ +SDIO_HOST_bSDIO_CMD__F0_REG) + +#define SDIO_CMD_RESPONSE_REG (* (reg8 *) \ +SDIO_HOST_bSDIO_CMD__F1_REG) + +#define SDIO_CMD_RESPONSE_PTR ( (reg8 *) \ +SDIO_HOST_bSDIO_CMD__F1_REG) + +#define SDIO_DAT_WRITE_REG (* (reg16 *) \ +SDIO_HOST_bSDIO_Write_DP__F0_F1_REG) + +#define SDIO_DAT_WRITE_PTR ( (reg16 *) \ +SDIO_HOST_bSDIO_Write_DP__F0_F1_REG) + +#define SDIO_DAT_READ_REG (* (reg16 *) \ +SDIO_HOST_bSDIO_Read_DP__F0_F1_REG) + +#define SDIO_DAT_READ_PTR ( (reg16 *) \ +SDIO_HOST_bSDIO_Read_DP__F0_F1_REG) + +#define SDIO_BYTE_COUNT_REG (* (reg8 *) \ +SDIO_HOST_bSDIO_byteCounter__PERIOD_REG) + +/** \endcond */ + +#if defined(__cplusplus) +} +#endif + +#endif /* (CY_SDIO_H) */ + +/** \} group_udb_sdio */ + +/* [] END OF FILE */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/SDIO_HOST/SDIO_HOST_cfg.c b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/SDIO_HOST/SDIO_HOST_cfg.c new file mode 100644 index 00000000000..94e533da700 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/SDIO_HOST/SDIO_HOST_cfg.c @@ -0,0 +1,1056 @@ +/***************************************************************************//** +* \file SDIO_HOST_cfg.c +* +* \brief +* This file provides the configuration of the UDB based SDIO driver. +* +******************************************************************************** +* \copyright +* Copyright 2016-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*******************************************************************************/ + +#include "SDIO_HOST_cfg.h" + +#if defined(__cplusplus) +extern "C" { +#endif + +/***************************CMD DMA Config Struct****************************/ +cy_stc_dma_descriptor_config_t SDIO_HOST_CMD_DMA_CMD_DMA_Desc_config = +{ + .retrigger = CY_DMA_RETRIG_16CYC, + .interruptType = CY_DMA_1ELEMENT, + .triggerOutType = CY_DMA_1ELEMENT, + .channelState = CY_DMA_CHANNEL_DISABLED, + .triggerInType = CY_DMA_1ELEMENT, + .dataSize = CY_DMA_BYTE, + .srcTransferSize = CY_DMA_TRANSFER_SIZE_DATA, + .dstTransferSize = CY_DMA_TRANSFER_SIZE_DATA, + .descriptorType = CY_DMA_1D_TRANSFER, + .srcAddress = NULL, + .dstAddress = NULL, + .srcXincrement = 1L, + .dstXincrement = 0L, + .xCount = 5UL, + .srcYincrement = 0L, + .dstYincrement = 0L, + .yCount = 1UL, + .nextDescriptor = NULL +}; + +cy_stc_dma_descriptor_t SDIO_HOST_CMD_DMA_CMD_DMA_Desc = +{ + .ctl = 0UL, + .src = 0UL, + .dst = 0UL, + .xCtl = 0UL, + .yCtl = 0UL, + .nextPtr = 0UL +}; + +/***************************Read DMA Config Struct****************************/ +cy_stc_dma_descriptor_config_t SDIO_HOST_Read_DMA_Read_DMA_Desc_config = +{ + .retrigger = CY_DMA_RETRIG_IM, + .interruptType = CY_DMA_DESCR, + .triggerOutType = CY_DMA_1ELEMENT, + .channelState = CY_DMA_CHANNEL_DISABLED, + .triggerInType = CY_DMA_X_LOOP, + .dataSize = CY_DMA_HALFWORD, + .srcTransferSize = CY_DMA_TRANSFER_SIZE_DATA, + .dstTransferSize = CY_DMA_TRANSFER_SIZE_DATA, + .descriptorType = CY_DMA_2D_TRANSFER, + .srcAddress = NULL, + .dstAddress = NULL, + .srcXincrement = 0L, + .dstXincrement = 2L, + .xCount = 10UL, + .srcYincrement = 0L, + .dstYincrement = 10L, + .yCount = 2UL, + .nextDescriptor = NULL +}; + +cy_stc_dma_descriptor_t SDIO_HOST_Read_DMA_Read_DMA_Desc = +{ + .ctl = 0UL, + .src = 0UL, + .dst = 0UL, + .xCtl = 0UL, + .yCtl = 0UL, + .nextPtr = 0UL +}; + +/***************************Resp DMA Config Struct****************************/ +cy_stc_dma_descriptor_config_t SDIO_HOST_Resp_DMA_Resp_DMA_Desc_config = +{ + .retrigger = CY_DMA_RETRIG_IM, + .interruptType = CY_DMA_1ELEMENT, + .triggerOutType = CY_DMA_1ELEMENT, + .channelState = CY_DMA_CHANNEL_DISABLED, + .triggerInType = CY_DMA_1ELEMENT, + .dataSize = CY_DMA_BYTE, + .srcTransferSize = CY_DMA_TRANSFER_SIZE_DATA, + .dstTransferSize = CY_DMA_TRANSFER_SIZE_DATA, + .descriptorType = CY_DMA_1D_TRANSFER, + .srcAddress = NULL, + .dstAddress = NULL, + .srcXincrement = 0L, + .dstXincrement = 1L, + .xCount = 6UL, + .srcYincrement = 0L, + .dstYincrement = 0L, + .yCount = 1UL, + .nextDescriptor = NULL +}; + +cy_stc_dma_descriptor_t SDIO_HOST_Resp_DMA_Resp_DMA_Desc = +{ + .ctl = 0UL, + .src = 0UL, + .dst = 0UL, + .xCtl = 0UL, + .yCtl = 0UL, + .nextPtr = 0UL +}; + +/***************************Write DMA Config Struct****************************/ +cy_stc_dma_descriptor_config_t SDIO_HOST_Write_DMA_Write_DMA_Desc_config = +{ + .retrigger = CY_DMA_RETRIG_4CYC, + .interruptType = CY_DMA_DESCR, + .triggerOutType = CY_DMA_1ELEMENT, + .channelState = CY_DMA_CHANNEL_DISABLED, + .triggerInType = CY_DMA_X_LOOP, + .dataSize = CY_DMA_HALFWORD, + .srcTransferSize = CY_DMA_TRANSFER_SIZE_DATA, + .dstTransferSize = CY_DMA_TRANSFER_SIZE_DATA, + .descriptorType = CY_DMA_2D_TRANSFER, + .srcAddress = NULL, + .dstAddress = NULL, + .srcXincrement = 2L, + .dstXincrement = 0L, + .xCount = 10UL, + .srcYincrement = 10L, + .dstYincrement = 0L, + .yCount = 2UL, + .nextDescriptor = NULL +}; + +cy_stc_dma_descriptor_t SDIO_HOST_Write_DMA_Write_DMA_Desc = +{ + .ctl = 0UL, + .src = 0UL, + .dst = 0UL, + .xCtl = 0UL, + .yCtl = 0UL, + .nextPtr = 0UL +}; + + + +/***************UDB Config code *****************/ + +#define CY_CFG_BASE_ADDR_COUNT 12u + +#if defined(__GNUC__) || defined(__ARMCC_VERSION) + #define CYPACKED + #define CYPACKED_ATTR __attribute__ ((packed)) + #define CY_CFG_UNUSED __attribute__ ((unused)) + + +#elif defined(__ICCARM__) + #include + + #define CYPACKED __packed + #define CYPACKED_ATTR + #define CY_CFG_UNUSED _Pragma("diag_suppress=Pe177") + + +#else + #error Unsupported toolchain +#endif + + +#ifndef CYCODE + #define CYCODE +#endif +#ifndef CYFAR + #define CYFAR +#endif + + +CY_CFG_UNUSED +static void CYMEMZERO(void *s, size_t n); +CY_CFG_UNUSED +static void CYMEMZERO(void *s, size_t n) +{ + (void)memset(s, 0, n); +} +CY_CFG_UNUSED +static void CYCONFIGCPY(void *dest, const void *src, size_t n); +CY_CFG_UNUSED +static void CYCONFIGCPY(void *dest, const void *src, size_t n) +{ + (void)memcpy(dest, src, n); +} +CY_CFG_UNUSED +static void CYCONFIGCPYCODE(void *dest, const void *src, size_t n); +CY_CFG_UNUSED +static void CYCONFIGCPYCODE(void *dest, const void *src, size_t n) +{ + (void)memcpy(dest, src, n); +} + +CYPACKED typedef struct +{ + uint8 offset; + uint8 value; +} CYPACKED_ATTR cy_cfg_addrvalue_t; + + +/******************************************************************************* +* Function Name: cfg_write_bytes32 +******************************************************************************** +* Summary: +* This function is used for setting up the chip configuration areas that +* contain relatively sparse data. +* +* Parameters: +* void +* +* Return: +* void +* +*******************************************************************************/ + +static void cfg_write_bytes32(const uint32 addr_table[], const cy_cfg_addrvalue_t data_table[]); +static void cfg_write_bytes32(const uint32 addr_table[], const cy_cfg_addrvalue_t data_table[]) +{ + /* For 32-bit little-endian architectures */ + uint32 i, j = 0u; + for (i = 0u; i < CY_CFG_BASE_ADDR_COUNT; i++) + { + uint32 baseAddr = addr_table[i]; + uint8 count = (uint8)baseAddr; + baseAddr &= 0xFFFFFF00u; + while (count != 0u) + { + CY_SET_REG8((void *)(baseAddr + data_table[j].offset), data_table[j].value); + j++; + count--; + } + } +} + +static const uint32 CYCODE cy_cfg_addr_table[] = +{ + 0x40340002u, /* Base address: 0x40340000 Count: 2 */ + 0x4034010Au, /* Base address: 0x40340100 Count: 10 */ + 0x40340301u, /* Base address: 0x40340300 Count: 1 */ + 0x40340405u, /* Base address: 0x40340400 Count: 5 */ + 0x40342466u, /* Base address: 0x40342400 Count: 102 */ + 0x40342632u, /* Base address: 0x40342600 Count: 50 */ + 0x4034282Bu, /* Base address: 0x40342800 Count: 43 */ + 0x40342A5Eu, /* Base address: 0x40342A00 Count: 94 */ + 0x40347005u, /* Base address: 0x40347000 Count: 5 */ + 0x40347102u, /* Base address: 0x40347100 Count: 2 */ + 0x40347202u, /* Base address: 0x40347200 Count: 2 */ + 0x40347804u, /* Base address: 0x40347800 Count: 4 */ +}; + +static const cy_cfg_addrvalue_t CYCODE cy_cfg_data_table[] = +{ + {0x18u, 0xFFu}, + {0x1Du, 0x01u}, + {0x00u, 0x10u}, + {0x04u, 0x88u}, + {0x09u, 0x02u}, + {0x10u, 0x10u}, + {0x14u, 0x88u}, + {0x1Du, 0x01u}, + {0x20u, 0x10u}, + {0x24u, 0x88u}, + {0x28u, 0x10u}, + {0x2Cu, 0x88u}, + {0x15u, 0x40u}, + {0x04u, 0x07u}, + {0x14u, 0x47u}, + {0x1Cu, 0x2Fu}, + {0x20u, 0x03u}, + {0x28u, 0x0Fu}, + {0x01u, 0x8Eu}, + {0x03u, 0x70u}, + {0x05u, 0x04u}, + {0x0Au, 0x01u}, + {0x0Du, 0x04u}, + {0x11u, 0x60u}, + {0x13u, 0x80u}, + {0x15u, 0x04u}, + {0x18u, 0x02u}, + {0x19u, 0xD0u}, + {0x1Bu, 0x23u}, + {0x21u, 0x01u}, + {0x23u, 0x20u}, + {0x25u, 0xD0u}, + {0x27u, 0x2Fu}, + {0x2Du, 0x10u}, + {0x2Eu, 0x01u}, + {0x2Fu, 0x48u}, + {0x30u, 0x01u}, + {0x31u, 0xE0u}, + {0x34u, 0x02u}, + {0x35u, 0x1Fu}, + {0x3Bu, 0x02u}, + {0x3Du, 0x22u}, + {0x3Eu, 0x11u}, + {0x40u, 0x52u}, + {0x41u, 0x01u}, + {0x44u, 0x06u}, + {0x49u, 0xFFu}, + {0x4Au, 0xFFu}, + {0x4Bu, 0xFFu}, + {0x4Cu, 0x12u}, + {0x4Du, 0x5Cu}, + {0x4Eu, 0x78u}, + {0x5Cu, 0x04u}, + {0x5Du, 0x0Cu}, + {0x5Eu, 0x0Cu}, + {0x63u, 0x09u}, + {0x64u, 0x50u}, + {0x65u, 0xA8u}, + {0x69u, 0x1Cu}, + {0x6Au, 0x58u}, + {0x6Bu, 0xA1u}, + {0x6Du, 0x10u}, + {0x70u, 0x10u}, + {0x71u, 0x1Du}, + {0x86u, 0x20u}, + {0x8Au, 0x20u}, + {0x8Bu, 0x02u}, + {0x8Cu, 0x20u}, + {0x90u, 0xBAu}, + {0x92u, 0x04u}, + {0x94u, 0x08u}, + {0x96u, 0x11u}, + {0x98u, 0x78u}, + {0x9Au, 0x02u}, + {0x9Cu, 0x18u}, + {0x9Eu, 0xC4u}, + {0xA3u, 0x01u}, + {0xA4u, 0x08u}, + {0xA6u, 0x10u}, + {0xA8u, 0xFEu}, + {0xABu, 0x01u}, + {0xADu, 0x02u}, + {0xAEu, 0x20u}, + {0xB0u, 0x01u}, + {0xB2u, 0x18u}, + {0xB3u, 0x01u}, + {0xB4u, 0x06u}, + {0xB5u, 0x02u}, + {0xB6u, 0xE0u}, + {0xBAu, 0x08u}, + {0xBFu, 0x14u}, + {0xC0u, 0x52u}, + {0xC1u, 0x01u}, + {0xC4u, 0x06u}, + {0xC5u, 0xB0u}, + {0xC7u, 0x40u}, + {0xC8u, 0x22u}, + {0xC9u, 0xFFu}, + {0xCAu, 0xFFu}, + {0xCBu, 0xFFu}, + {0xCCu, 0x13u}, + {0xCDu, 0x5Cu}, + {0xCEu, 0x77u}, + {0xD4u, 0xDEu}, + {0xD5u, 0x40u}, + {0xD6u, 0x4Bu}, + {0xD7u, 0x04u}, + {0xDCu, 0x0Cu}, + {0xDDu, 0x04u}, + {0xDEu, 0x0Cu}, + {0xDFu, 0x0Cu}, + {0xE3u, 0x09u}, + {0xE4u, 0x50u}, + {0xE5u, 0xA8u}, + {0xE9u, 0x1Cu}, + {0xEAu, 0x58u}, + {0xEBu, 0xA1u}, + {0xEDu, 0x10u}, + {0xF0u, 0x10u}, + {0xF1u, 0x1Du}, + {0x00u, 0x08u}, + {0x04u, 0x01u}, + {0x05u, 0x07u}, + {0x08u, 0x01u}, + {0x0Au, 0x08u}, + {0x0Fu, 0x05u}, + {0x12u, 0x01u}, + {0x14u, 0x10u}, + {0x16u, 0x01u}, + {0x18u, 0x01u}, + {0x1Au, 0x04u}, + {0x1Eu, 0x0Eu}, + {0x1Fu, 0x06u}, + {0x20u, 0x01u}, + {0x22u, 0x02u}, + {0x25u, 0x03u}, + {0x2Au, 0x10u}, + {0x2Bu, 0x01u}, + {0x32u, 0x10u}, + {0x36u, 0x0Fu}, + {0x37u, 0x07u}, + {0x3Cu, 0x80u}, + {0x40u, 0x36u}, + {0x41u, 0x01u}, + {0x42u, 0x20u}, + {0x44u, 0x05u}, + {0x45u, 0xFBu}, + {0x46u, 0xC0u}, + {0x47u, 0xE0u}, + {0x48u, 0x2Bu}, + {0x49u, 0xFFu}, + {0x4Au, 0xFFu}, + {0x4Bu, 0xFFu}, + {0x4Cu, 0x02u}, + {0x4Fu, 0x0Cu}, + {0x50u, 0x08u}, + {0x51u, 0x10u}, + {0x5Cu, 0x0Cu}, + {0x5Du, 0x0Cu}, + {0x5Eu, 0x0Cu}, + {0x63u, 0x09u}, + {0x65u, 0x08u}, + {0x68u, 0xC0u}, + {0x6Cu, 0x10u}, + {0x6Du, 0x11u}, + {0x6Eu, 0x40u}, + {0x6Fu, 0x01u}, + {0x71u, 0x10u}, + {0x72u, 0x50u}, + {0x73u, 0xA8u}, + {0x82u, 0x08u}, + {0x84u, 0x07u}, + {0x86u, 0xF8u}, + {0x8Cu, 0x0Eu}, + {0x8Eu, 0xD1u}, + {0x92u, 0x21u}, + {0x96u, 0x01u}, + {0x98u, 0x04u}, + {0x9Eu, 0x04u}, + {0xA0u, 0x04u}, + {0xA4u, 0xB9u}, + {0xA6u, 0x06u}, + {0xA8u, 0x89u}, + {0xAAu, 0x72u}, + {0xAEu, 0x60u}, + {0xB0u, 0x80u}, + {0xB2u, 0x7Fu}, + {0xBAu, 0x08u}, + {0xBCu, 0x08u}, + {0xBEu, 0x01u}, + {0xC0u, 0x42u}, + {0xC1u, 0x05u}, + {0xC4u, 0x06u}, + {0xC6u, 0x40u}, + {0xC7u, 0xB0u}, + {0xC8u, 0x28u}, + {0xC9u, 0xFFu}, + {0xCAu, 0xFFu}, + {0xCBu, 0xFFu}, + {0xCCu, 0x13u}, + {0xCDu, 0x5Cu}, + {0xCEu, 0x77u}, + {0xDCu, 0x0Cu}, + {0xDEu, 0x0Cu}, + {0xE3u, 0x09u}, + {0xE4u, 0x50u}, + {0xE5u, 0xA8u}, + {0xE9u, 0x1Cu}, + {0xEAu, 0x58u}, + {0xEBu, 0xA1u}, + {0xEDu, 0x10u}, + {0xF0u, 0x10u}, + {0xF1u, 0x1Du}, + {0x03u, 0x40u}, + {0x09u, 0x10u}, + {0x0Cu, 0x2Au}, + {0x0Du, 0x30u}, + {0x0Eu, 0x01u}, + {0x0Fu, 0x0Au}, + {0x15u, 0x30u}, + {0x17u, 0x0Au}, + {0x1Du, 0x0Cu}, + {0x1Eu, 0x14u}, + {0x20u, 0x02u}, + {0x22u, 0x29u}, + {0x23u, 0x35u}, + {0x24u, 0x30u}, + {0x25u, 0x03u}, + {0x28u, 0x03u}, + {0x29u, 0x20u}, + {0x2Au, 0x28u}, + {0x2Cu, 0x0Cu}, + {0x2Du, 0x0Au}, + {0x2Fu, 0x30u}, + {0x30u, 0x01u}, + {0x31u, 0x70u}, + {0x32u, 0x30u}, + {0x33u, 0x0Cu}, + {0x34u, 0x0Cu}, + {0x35u, 0x03u}, + {0x36u, 0x02u}, + {0x38u, 0x28u}, + {0x39u, 0x28u}, + {0x3Eu, 0x55u}, + {0x3Fu, 0x15u}, + {0x40u, 0x42u}, + {0x41u, 0x05u}, + {0x44u, 0x06u}, + {0x49u, 0xFFu}, + {0x4Au, 0xFFu}, + {0x4Bu, 0xFFu}, + {0x4Cu, 0x12u}, + {0x4Du, 0x5Cu}, + {0x4Eu, 0x78u}, + {0x57u, 0x02u}, + {0x58u, 0x7Fu}, + {0x5Cu, 0x04u}, + {0x5Du, 0x04u}, + {0x5Eu, 0x0Cu}, + {0x5Fu, 0x0Cu}, + {0x62u, 0x08u}, + {0x63u, 0x09u}, + {0x64u, 0x50u}, + {0x65u, 0xA8u}, + {0x69u, 0x1Cu}, + {0x6Au, 0x58u}, + {0x6Bu, 0xA1u}, + {0x6Du, 0x10u}, + {0x70u, 0x10u}, + {0x71u, 0x1Du}, + {0x82u, 0x01u}, + {0x86u, 0x01u}, + {0x8Au, 0x02u}, + {0x8Cu, 0x01u}, + {0x98u, 0x01u}, + {0x9Cu, 0x03u}, + {0x9Eu, 0x04u}, + {0xA0u, 0x01u}, + {0xA8u, 0x01u}, + {0xACu, 0x03u}, + {0xAEu, 0x04u}, + {0xB4u, 0x07u}, + {0xB6u, 0x07u}, + {0xBCu, 0xA0u}, + {0xC0u, 0x42u}, + {0xC1u, 0x05u}, + {0xC4u, 0x06u}, + {0xC7u, 0xB4u}, + {0xC8u, 0x30u}, + {0xC9u, 0xFFu}, + {0xCAu, 0xFFu}, + {0xCBu, 0xFFu}, + {0xCCu, 0x13u}, + {0xCDu, 0x5Cu}, + {0xCEu, 0x77u}, + {0xDCu, 0x0Fu}, + {0xDEu, 0x0Fu}, + {0xDFu, 0x04u}, + {0xE3u, 0x09u}, + {0xE4u, 0x50u}, + {0xE5u, 0xA8u}, + {0xE9u, 0x1Cu}, + {0xEAu, 0x58u}, + {0xEBu, 0xA1u}, + {0xEDu, 0x10u}, + {0xF0u, 0x10u}, + {0xF1u, 0x1Du}, + {0x28u, 0x10u}, + {0xA8u, 0xE1u}, + {0xACu, 0x52u}, + {0xB0u, 0xAAu}, + {0xB4u, 0x01u}, + {0xA8u, 0xA1u}, + {0xE8u, 0x02u}, + {0xA8u, 0x87u}, + {0xACu, 0x53u}, + {0x00u, 0x01u}, + {0x10u, 0x01u}, + {0x14u, 0x01u}, + {0x18u, 0x01u}, +}; + + + +CYPACKED typedef struct +{ +void *address; +uint16 size; +} CYPACKED_ATTR cfg_memset_t; + + +CYPACKED typedef struct +{ + void *dest; + const void *src; + size_t size; +} CYPACKED_ATTR cfg_memcpy_t; + +static const cfg_memset_t CYCODE cfg_memset_list[] = +{ + /* address, size */ + {(void CYFAR *)(CYDEV_UDB_UDBPAIR2_UDBSNG0_BASE), 116u}, + {(void CYFAR *)(CYDEV_UDB_UDBPAIR2_UDBSNG1_BASE), 116u}, + {(void CYFAR *)(CYDEV_UDB_UDBPAIR3_UDBSNG0_BASE), 116u}, + {(void CYFAR *)(CYDEV_UDB_UDBPAIR4_UDBSNG1_BASE), 116u}, + {(void CYFAR *)(CYDEV_UDB_UDBPAIR5_UDBSNG0_BASE), 116u}, + {(void CYFAR *)(CYDEV_UDB_UDBPAIR5_UDBSNG1_BASE), 116u}, +}; + +/* UDB_UDBPAIR4_UDBSNG0 Address: CYDEV_UDB_UDBPAIR4_UDBSNG0_BASE Size (bytes): 116 */ +static const uint8 CYCODE BS_UDB_UDBPAIR4_UDBSNG0_VAL[] = +{ + 0x42u, 0x00u, 0x25u, 0x0Au, 0x50u, 0x00u, 0x08u, 0x00u, 0x48u, 0x00u, 0x10u, 0x05u, 0x04u, 0x00u, 0x00u, 0x00u, + 0x61u, 0x00u, 0x06u, 0x00u, 0x00u, 0x0Au, 0x00u, 0x00u, 0x41u, 0x0Cu, 0x26u, 0x03u, 0x00u, 0x00u, 0x04u, 0x0Au, + 0x48u, 0x05u, 0x10u, 0x00u, 0x40u, 0x00u, 0x18u, 0x05u, 0x04u, 0x00u, 0x00u, 0x05u, 0x02u, 0x00u, 0x00u, 0x00u, + 0x07u, 0x0Cu, 0x40u, 0x03u, 0x07u, 0x00u, 0x38u, 0x00u, 0x00u, 0x00u, 0x22u, 0x00u, 0x22u, 0x00u, 0x44u, 0x05u, + 0x42u, 0x05u, 0x00u, 0x00u, 0x06u, 0x00u, 0x00u, 0x00u, 0x00u, 0xFFu, 0xFFu, 0xFFu, 0x12u, 0x5Cu, 0x78u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x02u, 0x71u, 0x00u, 0x00u, 0x00u, 0x0Cu, 0x04u, 0x0Cu, 0x0Cu, + 0x00u, 0x00u, 0x08u, 0x09u, 0x50u, 0xA8u, 0x00u, 0x00u, 0x00u, 0x1Cu, 0x58u, 0xA1u, 0x00u, 0x10u, 0x00u, 0x00u, + 0x10u, 0x1Du, 0x00u, 0x00u +}; + +/* UDB_UDBPAIR3_UDBSNG1 Address: CYDEV_UDB_UDBPAIR3_UDBSNG1_BASE Size (bytes): 116 */ +static const uint8 CYCODE BS_UDB_UDBPAIR3_UDBSNG1_VAL[] = +{ + 0x00u, 0x00u, 0x00u, 0x00u, 0x08u, 0x88u, 0x00u, 0x00u, 0x08u, 0x00u, 0x00u, 0x00u, 0x02u, 0x88u, 0x01u, 0x00u, + 0x08u, 0x00u, 0x00u, 0x00u, 0x00u, 0x88u, 0x03u, 0x00u, 0x01u, 0xBCu, 0x00u, 0x40u, 0x39u, 0x22u, 0x46u, 0xC5u, + 0x00u, 0x00u, 0x04u, 0x01u, 0x28u, 0xA2u, 0x56u, 0x4Du, 0x51u, 0x00u, 0x2Eu, 0x00u, 0x08u, 0x00u, 0x00u, 0x10u, + 0x00u, 0x60u, 0x00u, 0x80u, 0x1Fu, 0x00u, 0x60u, 0x1Fu, 0x00u, 0x80u, 0x20u, 0x00u, 0x20u, 0x80u, 0x40u, 0x05u, + 0x64u, 0x03u, 0x00u, 0x00u, 0x00u, 0x02u, 0x00u, 0x06u, 0x11u, 0xFFu, 0xFFu, 0xFFu, 0x00u, 0xA0u, 0x00u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x02u, 0x73u, 0x00u, 0x00u, 0x00u, 0x0Cu, 0x0Cu, 0x0Cu, 0x0Cu, + 0x00u, 0x00u, 0x08u, 0x09u, 0x00u, 0x00u, 0x40u, 0x40u, 0x10u, 0x50u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u +}; + +/* UDB_UDBPAIR1_UDBSNG1 Address: CYDEV_UDB_UDBPAIR1_UDBSNG1_BASE Size (bytes): 116 */ +static const uint8 CYCODE BS_UDB_UDBPAIR1_UDBSNG1_VAL[] = +{ + 0x04u, 0x20u, 0x02u, 0x10u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x79u, 0x00u, 0x82u, 0x11u, 0x48u, 0x2Eu, 0x95u, + 0x09u, 0x08u, 0x16u, 0x00u, 0x00u, 0x00u, 0x00u, 0x08u, 0x00u, 0x8Du, 0x00u, 0x72u, 0x20u, 0x08u, 0x00u, 0x00u, + 0x2Eu, 0x00u, 0x11u, 0x00u, 0x00u, 0x08u, 0x00u, 0x00u, 0x00u, 0x08u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x84u, + 0x38u, 0xE0u, 0x02u, 0x07u, 0x04u, 0x18u, 0x01u, 0x07u, 0x00u, 0x00u, 0x82u, 0x22u, 0x82u, 0xAAu, 0x14u, 0x00u, + 0x41u, 0x05u, 0x63u, 0x00u, 0x00u, 0x0Eu, 0x00u, 0xF0u, 0x21u, 0xFFu, 0xFFu, 0xFFu, 0x00u, 0x00u, 0x00u, 0x2Fu, + 0x08u, 0x10u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x0Cu, 0x0Cu, 0x0Cu, 0x04u, + 0x00u, 0x00u, 0x00u, 0x09u, 0x50u, 0xA8u, 0x08u, 0x03u, 0x08u, 0x00u, 0x18u, 0x03u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x58u, 0xECu, 0x00u, 0x00u +}; + +/* UDB_UDBPAIR0_UDBSNG0 Address: CYDEV_UDB_UDBPAIR0_UDBSNG0_BASE Size (bytes): 116 */ +static const uint8 CYCODE BS_UDB_UDBPAIR0_UDBSNG0_VAL[] = +{ + 0x95u, 0x08u, 0x6Au, 0x00u, 0x26u, 0x62u, 0xD9u, 0x9Du, 0x82u, 0x00u, 0x40u, 0x42u, 0x00u, 0x00u, 0x80u, 0x00u, + 0x00u, 0x00u, 0x90u, 0x32u, 0x4Eu, 0x00u, 0xB1u, 0x01u, 0x92u, 0x00u, 0x6Du, 0x00u, 0x00u, 0xB5u, 0x04u, 0x4Au, + 0x04u, 0x00u, 0x00u, 0x00u, 0x04u, 0xF2u, 0x00u, 0x09u, 0x00u, 0x66u, 0x01u, 0x88u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x3Fu, 0xE0u, 0xC0u, 0x1Fu, 0x3Fu, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x2Au, 0x0Au, 0x2Au, 0x0Au, 0x00u, 0x00u, + 0x43u, 0x01u, 0x00u, 0x00u, 0x02u, 0x00u, 0x00u, 0x00u, 0x00u, 0xFFu, 0xFFu, 0xFFu, 0x12u, 0x5Cu, 0x78u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x0Cu, 0x0Cu, 0x0Cu, 0x00u, + 0x00u, 0x00u, 0x00u, 0x09u, 0x50u, 0xA8u, 0x00u, 0x00u, 0x00u, 0x1Cu, 0x58u, 0xA1u, 0x00u, 0x10u, 0x00u, 0x00u, + 0x10u, 0x1Du, 0x00u, 0x00u +}; + +/* UDB_UDBPAIR1_UDBSNG0 Address: CYDEV_UDB_UDBPAIR1_UDBSNG0_BASE Size (bytes): 116 */ +static const uint8 CYCODE BS_UDB_UDBPAIR1_UDBSNG0_VAL[] = +{ + 0x00u, 0x01u, 0x00u, 0x00u, 0xABu, 0x00u, 0x00u, 0x03u, 0x2Bu, 0xC9u, 0x54u, 0x12u, 0x02u, 0x00u, 0x00u, 0x40u, + 0xAAu, 0x00u, 0x01u, 0x01u, 0x81u, 0x05u, 0x2Au, 0xBAu, 0xAAu, 0x00u, 0x00u, 0x40u, 0x08u, 0xB3u, 0x00u, 0x4Cu, + 0x04u, 0x20u, 0x00u, 0x80u, 0x40u, 0x00u, 0x00u, 0x01u, 0x10u, 0x01u, 0x00u, 0x80u, 0x20u, 0xB1u, 0x00u, 0x04u, + 0x19u, 0x00u, 0x07u, 0x80u, 0x61u, 0x00u, 0x80u, 0x7Fu, 0x2Au, 0x00u, 0x00u, 0x80u, 0x00u, 0x80u, 0x55u, 0x04u, + 0x24u, 0x06u, 0x00u, 0x00u, 0x01u, 0x0Eu, 0x00u, 0xC4u, 0x31u, 0xFFu, 0xFFu, 0x0Eu, 0x82u, 0x20u, 0x00u, 0x00u, + 0x08u, 0x10u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x01u, 0x00u, 0x00u, 0x00u, 0x00u, 0x04u, 0x0Cu, 0x0Cu, 0x04u, + 0x00u, 0x00u, 0x00u, 0x09u, 0x40u, 0x09u, 0x00u, 0x00u, 0x00u, 0x00u, 0xF0u, 0x10u, 0x00u, 0x13u, 0x10u, 0x13u, + 0x40u, 0x03u, 0x00u, 0x10u +}; + +/* UDB_UDBPAIR0_UDBSNG1 Address: CYDEV_UDB_UDBPAIR0_UDBSNG1_BASE Size (bytes): 116 */ +static const uint8 CYCODE BS_UDB_UDBPAIR0_UDBSNG1_VAL[] = +{ + 0x00u, 0x00u, 0x80u, 0x03u, 0x7Bu, 0x04u, 0x80u, 0x00u, 0x33u, 0x1Cu, 0xCCu, 0x00u, 0x04u, 0x03u, 0x00u, 0x00u, + 0x8Au, 0x00u, 0x71u, 0x04u, 0xB9u, 0x00u, 0x42u, 0x0Cu, 0x00u, 0x03u, 0x20u, 0x00u, 0x00u, 0x14u, 0x00u, 0x00u, + 0x00u, 0x00u, 0xA0u, 0x03u, 0x0Au, 0x1Cu, 0xD0u, 0x00u, 0x02u, 0x02u, 0x00u, 0x00u, 0x00u, 0x01u, 0x00u, 0x00u, + 0x00u, 0x07u, 0x00u, 0x18u, 0xF8u, 0x00u, 0x07u, 0x00u, 0x80u, 0x08u, 0x20u, 0x00u, 0x20u, 0x00u, 0x40u, 0x05u, + 0x43u, 0x01u, 0x00u, 0x00u, 0x02u, 0x00u, 0x40u, 0x0Bu, 0x18u, 0xFFu, 0xFFu, 0xFFu, 0x13u, 0x5Cu, 0x77u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x02u, 0x7Fu, 0x00u, 0x00u, 0x00u, 0x0Cu, 0x04u, 0x0Cu, 0x0Cu, + 0x00u, 0x00u, 0x08u, 0x09u, 0x50u, 0xA8u, 0x00u, 0x00u, 0x00u, 0x1Cu, 0x58u, 0xA1u, 0x00u, 0x10u, 0x00u, 0x00u, + 0x10u, 0x1Du, 0x00u, 0x00u +}; + +/* UDB_UDBPAIR0_ROUTE Address: CYDEV_UDB_UDBPAIR0_ROUTE_BASE Size (bytes): 144 */ +static const uint8 CYCODE BS_UDB_UDBPAIR0_ROUTE_VAL[] = +{ + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x25u, 0x40u, 0x13u, 0x30u, + 0x54u, 0xF1u, 0x1Fu, 0xF6u, 0xF5u, 0x33u, 0x05u, 0x12u, 0x33u, 0x51u, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0x32u, + 0xFFu, 0x00u, 0x00u, 0x00u, 0x21u, 0x32u, 0x75u, 0x37u, 0x23u, 0xF5u, 0x51u, 0x14u, 0x54u, 0x32u, 0x11u, 0x41u, + 0x33u, 0x51u, 0xFFu, 0x0Fu, 0x5Fu, 0xFFu, 0x2Fu, 0x22u, 0xFFu, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, + 0x14u, 0x01u, 0x01u, 0x11u, 0x10u, 0x44u, 0x53u, 0x33u, 0x14u, 0x11u, 0x40u, 0x01u, 0x01u, 0x33u, 0x4Cu, 0x04u, + 0x11u, 0x01u, 0x3Bu, 0x01u, 0x01u, 0x10u, 0x11u, 0x00u, 0x62u, 0x10u, 0x11u, 0x13u, 0x11u, 0x19u, 0x11u, 0x16u, + 0x09u, 0x73u, 0x10u, 0x66u, 0x11u, 0x11u, 0x11u, 0x11u, 0x12u, 0x11u, 0x11u, 0x14u, 0x11u, 0x14u, 0x11u, 0x11u +}; + +/* UDB_UDBPAIR1_ROUTE Address: CYDEV_UDB_UDBPAIR1_ROUTE_BASE Size (bytes): 144 */ +static const uint8 CYCODE BS_UDB_UDBPAIR1_ROUTE_VAL[] = +{ + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0xF0u, 0x0Fu, 0xF5u, 0x5Fu, + 0x22u, 0xFFu, 0x04u, 0xF1u, 0x56u, 0x63u, 0x61u, 0x12u, 0xF7u, 0x04u, 0x37u, 0x16u, 0x63u, 0xFFu, 0xFFu, 0x32u, + 0xFFu, 0x00u, 0x00u, 0x00u, 0x2Fu, 0x52u, 0x75u, 0x60u, 0x45u, 0x04u, 0x14u, 0x31u, 0x44u, 0x12u, 0x76u, 0x13u, + 0x51u, 0x73u, 0x70u, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0x22u, 0x25u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x02u, 0x01u, 0x00u, 0xF5u, + 0x4Fu, 0x06u, 0x00u, 0x00u, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, + 0x03u, 0x06u, 0x00u, 0xA1u, 0x06u, 0x0Cu, 0x36u, 0xF5u, 0x0Du, 0x10u, 0xF3u, 0x01u, 0x00u, 0xFFu, 0x3Fu, 0x0Fu, + 0x15u, 0x00u, 0xFBu, 0x01u, 0x03u, 0x10u, 0x11u, 0x4Cu, 0x11u, 0x52u, 0x90u, 0xC1u, 0xD2u, 0x15u, 0xC3u, 0x5Fu, + 0x36u, 0x0Fu, 0x23u, 0x3Cu, 0x00u, 0x11u, 0x15u, 0x11u, 0x11u, 0x31u, 0x14u, 0x1Fu, 0x11u, 0x8Fu, 0x11u, 0xC1u +}; + +/* UDB_UDBPAIR2_ROUTE Address: CYDEV_UDB_UDBPAIR2_ROUTE_BASE Size (bytes): 144 */ +static const uint8 CYCODE BS_UDB_UDBPAIR2_ROUTE_VAL[] = +{ + 0x00u, 0x00u, 0x00u, 0x00u, 0x01u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0xFFu, 0x11u, 0xFFu, 0x45u, + 0xFFu, 0x5Fu, 0xF5u, 0x44u, 0x4Fu, 0x36u, 0x43u, 0x73u, 0x13u, 0xFFu, 0x23u, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0x32u, + 0xFFu, 0x00u, 0x00u, 0x00u, 0x6Fu, 0x24u, 0x45u, 0x44u, 0x1Fu, 0x63u, 0x17u, 0x1Fu, 0xFFu, 0xFFu, 0x4Fu, 0xFFu, + 0x13u, 0x14u, 0x63u, 0x07u, 0x55u, 0xF7u, 0xF7u, 0x72u, 0xF0u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x02u, 0x05u, 0x2Fu, 0x10u, + 0xF0u, 0xF3u, 0xF0u, 0x10u, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, + 0x01u, 0x00u, 0x8Du, 0x16u, 0x21u, 0x0Fu, 0x1Fu, 0x1Fu, 0xAFu, 0xB0u, 0x0Fu, 0xADu, 0x00u, 0xFFu, 0x4Fu, 0x00u, + 0x05u, 0x0Du, 0x0Au, 0x41u, 0x00u, 0xAAu, 0x01u, 0xF1u, 0xC4u, 0x10u, 0xF0u, 0x04u, 0xF3u, 0x1Fu, 0xC4u, 0x3Fu, + 0x1Fu, 0x03u, 0xF0u, 0xF0u, 0x88u, 0x01u, 0x3Fu, 0x01u, 0x11u, 0xB1u, 0x57u, 0x81u, 0x11u, 0xC1u, 0x1Du, 0x14u +}; + +/* UDB_UDBPAIR3_ROUTE Address: CYDEV_UDB_UDBPAIR3_ROUTE_BASE Size (bytes): 144 */ +static const uint8 CYCODE BS_UDB_UDBPAIR3_ROUTE_VAL[] = +{ + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x0Fu, 0x36u, 0x34u, 0x32u, + 0x06u, 0x14u, 0xF5u, 0x46u, 0x43u, 0xF6u, 0xF3u, 0x43u, 0xFFu, 0x37u, 0x5Fu, 0xFFu, 0x5Fu, 0xF2u, 0xFFu, 0x32u, + 0xFFu, 0x00u, 0x00u, 0x00u, 0x45u, 0xF4u, 0x37u, 0x40u, 0xF0u, 0xF2u, 0x7Fu, 0xF4u, 0xF4u, 0xFFu, 0xF3u, 0x03u, + 0x73u, 0xF0u, 0x77u, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xF2u, 0xF3u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x07u, + 0x00u, 0x00u, 0x00u, 0x00u, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, + 0x00u, 0x06u, 0xBFu, 0x17u, 0x11u, 0x7Fu, 0x71u, 0x11u, 0x5Fu, 0x70u, 0x5Fu, 0xFFu, 0x06u, 0xFFu, 0x0Fu, 0x07u, + 0x7Fu, 0x3Fu, 0x0Fu, 0xF6u, 0x00u, 0x2Fu, 0x7Fu, 0x48u, 0xF4u, 0x30u, 0xB0u, 0x5Fu, 0x11u, 0x0Fu, 0x91u, 0xFFu, + 0x1Fu, 0x0Au, 0xF3u, 0xFBu, 0x15u, 0x11u, 0x1Fu, 0xA1u, 0x11u, 0x81u, 0x11u, 0x12u, 0x14u, 0x11u, 0x1Fu, 0x31u +}; + +/* UDB_UDBPAIR4_ROUTE Address: CYDEV_UDB_UDBPAIR4_ROUTE_BASE Size (bytes): 144 */ +static const uint8 CYCODE BS_UDB_UDBPAIR4_ROUTE_VAL[] = +{ + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x60u, 0x17u, 0xF5u, 0x65u, + 0x77u, 0x77u, 0x7Fu, 0x05u, 0x14u, 0xF4u, 0x5Fu, 0x0Fu, 0x1Fu, 0x5Fu, 0x43u, 0x5Fu, 0xFFu, 0xF2u, 0xFFu, 0x05u, + 0xFFu, 0x00u, 0x00u, 0x00u, 0x23u, 0x7Fu, 0x52u, 0x64u, 0x55u, 0x75u, 0xFFu, 0xFFu, 0xF5u, 0xFFu, 0x11u, 0xFFu, + 0x1Fu, 0x52u, 0x13u, 0x40u, 0xFFu, 0xF3u, 0xFFu, 0xF5u, 0xF3u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x03u, 0x25u, 0x00u, 0x30u, + 0x00u, 0x00u, 0x00u, 0x13u, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, + 0x00u, 0x81u, 0x1Fu, 0x11u, 0x11u, 0x5Fu, 0x91u, 0x10u, 0xFFu, 0x33u, 0x0Fu, 0xFFu, 0x30u, 0xFFu, 0x4Fu, 0x31u, + 0x1Fu, 0xFFu, 0x06u, 0x06u, 0x0Au, 0x28u, 0x08u, 0x66u, 0x11u, 0x10u, 0xF9u, 0x17u, 0x20u, 0x3Fu, 0x10u, 0x2Fu, + 0x1Fu, 0x00u, 0xF1u, 0xF6u, 0x1Bu, 0x11u, 0x1Fu, 0x11u, 0x11u, 0x33u, 0x31u, 0x11u, 0x17u, 0x11u, 0x11u, 0x1Bu +}; + +/* UDB_UDBPAIR5_ROUTE Address: CYDEV_UDB_UDBPAIR5_ROUTE_BASE Size (bytes): 144 */ +static const uint8 CYCODE BS_UDB_UDBPAIR5_ROUTE_VAL[] = +{ + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x43u, 0x43u, 0xFFu, 0x30u, + 0xF0u, 0x22u, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0x1Fu, 0x5Fu, 0x53u, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, + 0x42u, 0x00u, 0x00u, 0x00u, 0xFFu, 0x3Fu, 0xF3u, 0x1Fu, 0x15u, 0x11u, 0x13u, 0x13u, 0x41u, 0xF1u, 0x31u, 0x3Fu, + 0x1Fu, 0x53u, 0x03u, 0xF0u, 0x4Fu, 0xFFu, 0x2Fu, 0x13u, 0xF3u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x01u, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, + 0x23u, 0x11u, 0x1Fu, 0x11u, 0x31u, 0x7Fu, 0x61u, 0x17u, 0xBFu, 0x8Cu, 0x8Fu, 0xFFu, 0x39u, 0x1Fu, 0x95u, 0x1Cu, + 0x1Fu, 0xFFu, 0x6Cu, 0x7Fu, 0x33u, 0x1Fu, 0x7Fu, 0xFFu, 0x44u, 0x13u, 0x11u, 0x11u, 0x13u, 0x81u, 0x7Cu, 0x12u, + 0x11u, 0xCCu, 0x16u, 0x16u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u +}; + +/* UDB_DSI0 Address: CYDEV_UDB_DSI0_BASE Size (bytes): 124 */ +static const uint8 CYCODE BS_UDB_DSI0_VAL[] = +{ + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, + 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x11u, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, + 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x0Fu, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0xF1u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x1Du, + 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u +}; + +/* UDB_DSI1 Address: CYDEV_UDB_DSI1_BASE Size (bytes): 124 */ +static const uint8 CYCODE BS_UDB_DSI1_VAL[] = +{ + 0x00u, 0x08u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, + 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, + 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x0Fu, 0x0Fu, 0x00u, 0x20u, 0xF1u, 0x0Fu, 0x00u, 0x00u, + 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0x11u, 0xD1u, 0x11u, 0x11u, + 0x11u, 0xF1u, 0x11u, 0x11u, 0x1Fu, 0x11u, 0x11u, 0x11u, 0xD1u, 0x11u, 0x1Fu, 0x11u, 0x11u, 0xD1u, 0x11u, 0x10u, + 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x1Du, 0x11u, + 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u +}; + +/* UDB_DSI2 Address: CYDEV_UDB_DSI2_BASE Size (bytes): 124 */ +static const uint8 CYCODE BS_UDB_DSI2_VAL[] = +{ + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x1Fu, 0x0Au, 0x0Au, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x0Au, + 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x13u, 0x0Au, 0x00u, 0x0Du, 0x16u, 0x1Fu, 0x11u, 0x1Fu, + 0x1Fu, 0x1Fu, 0x0Au, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x0Fu, 0x00u, 0xF4u, 0xF0u, 0x10u, 0x10u, 0x50u, 0x00u, + 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0x11u, 0x01u, 0x11u, 0x11u, + 0x11u, 0xF1u, 0x12u, 0x11u, 0xBFu, 0x11u, 0x11u, 0x1Du, 0x01u, 0x11u, 0x12u, 0x11u, 0x11u, 0x01u, 0xF1u, 0x10u, + 0x11u, 0xD1u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x16u, 0x11u, 0x11u, 0x11u, 0x11u, 0x10u, 0x11u, + 0x1Du, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u +}; + +/* UDB_DSI3 Address: CYDEV_UDB_DSI3_BASE Size (bytes): 124 */ +static const uint8 CYCODE BS_UDB_DSI3_VAL[] = +{ + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, + 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, + 0x11u, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x0Fu, 0x00u, 0x00u, 0x00u, 0x00u, + 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0xF1u, 0x11u, 0x11u, 0x03u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0xD1u, 0x11u, + 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u +}; + +/* UDB_DSI4 Address: CYDEV_UDB_DSI4_BASE Size (bytes): 124 */ +static const uint8 CYCODE BS_UDB_DSI4_VAL[] = +{ + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, + 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, + 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0xF1u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u +}; + +/* UDB_DSI5 Address: CYDEV_UDB_DSI5_BASE Size (bytes): 124 */ +static const uint8 CYCODE BS_UDB_DSI5_VAL[] = +{ + 0x08u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, + 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, + 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x0Fu, + 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0xD1u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u +}; + +/* UDB_DSI6 Address: CYDEV_UDB_DSI6_BASE Size (bytes): 124 */ +static const uint8 CYCODE BS_UDB_DSI6_VAL[] = +{ + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, + 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x08u, 0x03u, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, + 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0x11u, 0x11u, 0x01u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0x11u, 0x11u, 0x01u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u +}; + +/* UDB_DSI7 Address: CYDEV_UDB_DSI7_BASE Size (bytes): 124 */ +static const uint8 CYCODE BS_UDB_DSI7_VAL[] = +{ + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x00u, 0x0Au, 0x1Fu, 0x08u, + 0x1Fu, 0x1Fu, 0x1Fu, 0x02u, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x0Eu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, + 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x0Fu, 0x0Fu, 0x00u, 0x00u, 0x00u, 0x00u, + 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0x10u, 0x11u, 0x11u, 0x11u, + 0x11u, 0x11u, 0x11u, 0x01u, 0x11u, 0x1Du, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x10u, 0x11u, 0x10u, 0x11u, + 0x11u, 0x11u, 0x11u, 0x01u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0xD1u, 0x11u, 0x11u +}; + +/* UDB_DSI8 Address: CYDEV_UDB_DSI8_BASE Size (bytes): 124 */ +static const uint8 CYCODE BS_UDB_DSI8_VAL[] = +{ + 0x00u, 0x80u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, + 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, + 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x0Fu, 0x00u, 0x00u, 0x0Fu, 0x0Fu, 0x00u, 0xF0u, + 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0x1Du, 0x11u, 0x11u, 0x11u, + 0x11u, 0x11u, 0x11u, 0x01u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x1Du, 0x11u, 0x1Du, 0x11u, + 0x11u, 0x11u, 0x11u, 0xD1u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u +}; + +/* UDB_DSI9 Address: CYDEV_UDB_DSI9_BASE Size (bytes): 124 */ +static const uint8 CYCODE BS_UDB_DSI9_VAL[] = +{ + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, + 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, + 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0x11u, 0x11u, 0x01u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u +}; + +/* UDB_DSI10 Address: CYDEV_UDB_DSI10_BASE Size (bytes): 124 */ +static const uint8 CYCODE BS_UDB_DSI10_VAL[] = +{ + 0x00u, 0x02u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, + 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x16u, 0x0Cu, 0x1Fu, 0x03u, 0x06u, 0x1Fu, 0x1Fu, 0x05u, + 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x0Fu, 0xFFu, 0x00u, 0xF0u, 0x00u, 0x00u, 0x00u, 0xFFu, + 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0x11u, 0x11u, 0xD1u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0xD1u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0xD1u, 0x11u, 0x1Du, 0x11u, 0x11u, 0x11u, + 0x11u, 0x11u, 0x11u, 0xD1u, 0xD1u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u +}; + +/* UDB_DSI11 Address: CYDEV_UDB_DSI11_BASE Size (bytes): 124 */ +static const uint8 CYCODE BS_UDB_DSI11_VAL[] = +{ + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, + 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, + 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x1Fu, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, + 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, + 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u, 0x11u +}; + +static const cfg_memcpy_t CYCODE cfg_memcpy_list [] = { + /* dest, src, size */ + {(void CYFAR *)(CYDEV_UDB_UDBPAIR4_UDBSNG0_BASE), BS_UDB_UDBPAIR4_UDBSNG0_VAL, 116u}, + {(void CYFAR *)(CYDEV_UDB_UDBPAIR3_UDBSNG1_BASE), BS_UDB_UDBPAIR3_UDBSNG1_VAL, 116u}, + {(void CYFAR *)(CYDEV_UDB_UDBPAIR1_UDBSNG1_BASE), BS_UDB_UDBPAIR1_UDBSNG1_VAL, 116u}, + {(void CYFAR *)(CYDEV_UDB_UDBPAIR0_UDBSNG0_BASE), BS_UDB_UDBPAIR0_UDBSNG0_VAL, 116u}, + {(void CYFAR *)(CYDEV_UDB_UDBPAIR1_UDBSNG0_BASE), BS_UDB_UDBPAIR1_UDBSNG0_VAL, 116u}, + {(void CYFAR *)(CYDEV_UDB_UDBPAIR0_UDBSNG1_BASE), BS_UDB_UDBPAIR0_UDBSNG1_VAL, 116u}, + {(void CYFAR *)(CYDEV_UDB_UDBPAIR0_ROUTE_BASE), BS_UDB_UDBPAIR0_ROUTE_VAL, 144u}, + {(void CYFAR *)(CYDEV_UDB_UDBPAIR1_ROUTE_BASE), BS_UDB_UDBPAIR1_ROUTE_VAL, 144u}, + {(void CYFAR *)(CYDEV_UDB_UDBPAIR2_ROUTE_BASE), BS_UDB_UDBPAIR2_ROUTE_VAL, 144u}, + {(void CYFAR *)(CYDEV_UDB_UDBPAIR3_ROUTE_BASE), BS_UDB_UDBPAIR3_ROUTE_VAL, 144u}, + {(void CYFAR *)(CYDEV_UDB_UDBPAIR4_ROUTE_BASE), BS_UDB_UDBPAIR4_ROUTE_VAL, 144u}, + {(void CYFAR *)(CYDEV_UDB_UDBPAIR5_ROUTE_BASE), BS_UDB_UDBPAIR5_ROUTE_VAL, 144u}, + {(void CYFAR *)(CYDEV_UDB_DSI0_BASE), BS_UDB_DSI0_VAL, 124u}, + {(void CYFAR *)(CYDEV_UDB_DSI1_BASE), BS_UDB_DSI1_VAL, 124u}, + {(void CYFAR *)(CYDEV_UDB_DSI2_BASE), BS_UDB_DSI2_VAL, 124u}, + {(void CYFAR *)(CYDEV_UDB_DSI3_BASE), BS_UDB_DSI3_VAL, 124u}, + {(void CYFAR *)(CYDEV_UDB_DSI4_BASE), BS_UDB_DSI4_VAL, 124u}, + {(void CYFAR *)(CYDEV_UDB_DSI5_BASE), BS_UDB_DSI5_VAL, 124u}, + {(void CYFAR *)(CYDEV_UDB_DSI6_BASE), BS_UDB_DSI6_VAL, 124u}, + {(void CYFAR *)(CYDEV_UDB_DSI7_BASE), BS_UDB_DSI7_VAL, 124u}, + {(void CYFAR *)(CYDEV_UDB_DSI8_BASE), BS_UDB_DSI8_VAL, 124u}, + {(void CYFAR *)(CYDEV_UDB_DSI9_BASE), BS_UDB_DSI9_VAL, 124u}, + {(void CYFAR *)(CYDEV_UDB_DSI10_BASE), BS_UDB_DSI10_VAL, 124u}, + {(void CYFAR *)(CYDEV_UDB_DSI11_BASE), BS_UDB_DSI11_VAL, 124u}, +}; + +void SDIO_Host_Config_TriggerMuxes(void) +{ + /* Connect UDB to DMA */ + Cy_TrigMux_Connect(TRIG0_IN_TR_GROUP14_OUTPUT1, TRIG0_OUT_CPUSS_DW0_TR_IN1, false, TRIGGER_TYPE_LEVEL); + Cy_TrigMux_Connect(TRIG0_IN_TR_GROUP14_OUTPUT4, TRIG0_OUT_CPUSS_DW0_TR_IN0, false, TRIGGER_TYPE_LEVEL); + Cy_TrigMux_Connect(TRIG1_IN_TR_GROUP14_OUTPUT0, TRIG1_OUT_CPUSS_DW1_TR_IN1, false, TRIGGER_TYPE_LEVEL); + Cy_TrigMux_Connect(TRIG1_IN_TR_GROUP14_OUTPUT5, TRIG1_OUT_CPUSS_DW1_TR_IN3, false, TRIGGER_TYPE_LEVEL); + + Cy_TrigMux_Connect(TRIG14_IN_UDB_TR_UDB0, TRIG14_OUT_TR_GROUP1_INPUT43, false, TRIGGER_TYPE_LEVEL); + Cy_TrigMux_Connect(TRIG14_IN_UDB_TR_UDB1, TRIG14_OUT_TR_GROUP0_INPUT44, false, TRIGGER_TYPE_LEVEL); + Cy_TrigMux_Connect(TRIG14_IN_UDB_TR_UDB3, TRIG14_OUT_TR_GROUP0_INPUT47, false, TRIGGER_TYPE_LEVEL); + Cy_TrigMux_Connect(TRIG14_IN_UDB_TR_UDB7, TRIG14_OUT_TR_GROUP1_INPUT48, false, TRIGGER_TYPE_LEVEL); +} + +void SDIO_Host_Config_UDBs(void) +{ + size_t i; + + /* Power on the UDB array */ + CY_SET_REG32(0x402101F0u, 0x05FA0003u); + + /* Zero out critical memory blocks before beginning configuration */ + for (i = 0u; i < (sizeof(cfg_memset_list)/sizeof(cfg_memset_list[0])); i++) + { + const cfg_memset_t *ms = &cfg_memset_list[i]; + CYMEMZERO(ms->address, ms->size); + } + + /* Copy device configuration data into registers */ + for (i = 0u; i < (sizeof(cfg_memcpy_list)/sizeof(cfg_memcpy_list[0])); i++) + { + const cfg_memcpy_t *mc = &cfg_memcpy_list[i]; + CYCONFIGCPYCODE(mc->dest, mc->src, mc->size); + } + + cfg_write_bytes32(cy_cfg_addr_table, cy_cfg_data_table); + + /* UDB_INT_CFG Starting address: CYDEV_UDB_UDBIF_INT_CLK_CTL */ + CY_SET_REG32((void *)(CYREG_UDB_UDBIF_INT_CLK_CTL), 0x00000001u); + + /* UDB_UDBPAIR0_UDBSNG0_RC_CFG0 Starting address: CYDEV_UDB_UDBPAIR0_UDBSNG0_RC_CFG0 */ + CY_SET_REG32((void *)(CYREG_UDB_UDBPAIR0_UDBSNG0_RC_CFG0), 0x004C4C4Cu); + + /* UDB_UDBPAIR0_UDBSNG1_RC_CFG0 Starting address: CYDEV_UDB_UDBPAIR0_UDBSNG1_RC_CFG0 */ + CY_SET_REG32((void *)(CYREG_UDB_UDBPAIR0_UDBSNG1_RC_CFG0), 0x4C4C444Cu); + + /* UDB_UDBPAIR1_UDBSNG0_RC_CFG0 Starting address: CYDEV_UDB_UDBPAIR1_UDBSNG0_RC_CFG0 */ + CY_SET_REG32((void *)(CYREG_UDB_UDBPAIR1_UDBSNG0_RC_CFG0), 0x044C4C44u); + + /* UDB_UDBPAIR1_UDBSNG1_RC_CFG0 Starting address: CYDEV_UDB_UDBPAIR1_UDBSNG1_RC_CFG0 */ + CY_SET_REG32((void *)(CYREG_UDB_UDBPAIR1_UDBSNG1_RC_CFG0), 0x044C4C4Cu); + + /* UDB_UDBPAIR2_UDBSNG0_RC_CFG0 Starting address: CYDEV_UDB_UDBPAIR2_UDBSNG0_RC_CFG0 */ + CY_SET_REG32((void *)(CYREG_UDB_UDBPAIR2_UDBSNG0_RC_CFG0), 0x004C4C44u); + + /* UDB_UDBPAIR2_UDBSNG1_RC_CFG0 Starting address: CYDEV_UDB_UDBPAIR2_UDBSNG1_RC_CFG0 */ + CY_SET_REG32((void *)(CYREG_UDB_UDBPAIR2_UDBSNG1_RC_CFG0), 0x0C4C040Cu); + + /* UDB_UDBPAIR3_UDBSNG0_RC_CFG0 Starting address: CYDEV_UDB_UDBPAIR3_UDBSNG0_RC_CFG0 */ + CY_SET_REG32((void *)(CYREG_UDB_UDBPAIR3_UDBSNG0_RC_CFG0), 0x008C8C8Cu); + + /* UDB_UDBPAIR3_UDBSNG1_RC_CFG0 Starting address: CYDEV_UDB_UDBPAIR3_UDBSNG1_RC_CFG0 */ + CY_SET_REG32((void *)(CYREG_UDB_UDBPAIR3_UDBSNG1_RC_CFG0), 0x4C4C4C4Cu); + + /* UDB_UDBPAIR4_UDBSNG0_RC_CFG0 Starting address: CYDEV_UDB_UDBPAIR4_UDBSNG0_RC_CFG0 */ + CY_SET_REG32((void *)(CYREG_UDB_UDBPAIR4_UDBSNG0_RC_CFG0), 0x4C4C444Cu); + + /* UDB_UDBPAIR4_UDBSNG1_RC_CFG0 Starting address: CYDEV_UDB_UDBPAIR4_UDBSNG1_RC_CFG0 */ + CY_SET_REG32((void *)(CYREG_UDB_UDBPAIR4_UDBSNG1_RC_CFG0), 0x008C808Cu); + + /* UDB_UDBPAIR5_UDBSNG0_RC_CFG0 Starting address: CYDEV_UDB_UDBPAIR5_UDBSNG0_RC_CFG0 */ + CY_SET_REG32((void *)(CYREG_UDB_UDBPAIR5_UDBSNG0_RC_CFG0), 0x8C8C0404u); + + /* UDB_UDBPAIR5_UDBSNG1_RC_CFG0 Starting address: CYDEV_UDB_UDBPAIR5_UDBSNG1_RC_CFG0 */ + CY_SET_REG32((void *)(CYREG_UDB_UDBPAIR5_UDBSNG1_RC_CFG0), 0x048F808Fu); + + /* Enable UDB array and digital routing */ + CY_SET_REG32((void *)0x40347900u, CY_GET_REG32((void *)0x40347900u) | 0x106u); +} + +#if defined(__cplusplus) +} +#endif + +/* [] END OF FILE */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/SDIO_HOST/SDIO_HOST_cfg.h b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/SDIO_HOST/SDIO_HOST_cfg.h new file mode 100644 index 00000000000..bed87f55bf0 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/SDIO_HOST/SDIO_HOST_cfg.h @@ -0,0 +1,931 @@ +/***************************************************************************//** +* \file SDIO_HOST_cfg.h +* +* \brief +* This file provides the configuration of the UDB based SDIO driver. +* +******************************************************************************** +* \copyright +* Copyright 2016-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*******************************************************************************/ + +#if !defined(CY_SDIO_CFG_H) +#define CY_SDIO_CFG_H + +#include + +#include "cy_dma.h" +#include "cy_sysclk.h" +#include "cy_trigmux.h" + +#if defined(__cplusplus) +extern "C" { +#endif + +#define CYREG_PROT_SMPU_MS0_CTL 0x40240000u +#define CYREG_PROT_SMPU_MS1_CTL 0x40240004u +#define CYREG_PROT_SMPU_MS2_CTL 0x40240008u +#define CYREG_PROT_SMPU_MS3_CTL 0x4024000cu +#define CYREG_PROT_SMPU_MS14_CTL 0x40240038u + +#define CYDEV_UDB_UDBPAIR1_UDBSNG0_BASE 0x40342200u +#define CYDEV_UDB_UDBPAIR0_UDBSNG1_BASE 0x40342080u + +#define CYREG_UDB_UDBPAIR0_UDBSNG0_RC_CFG0 0x4034205cu +#define CYREG_UDB_UDBPAIR0_UDBSNG1_RC_CFG0 0x403420dcu + +#define CYREG_UDB_UDBPAIR1_UDBSNG0_RC_CFG0 0x4034225cu +#define CYREG_UDB_UDBPAIR1_UDBSNG1_RC_CFG0 0x403422dcu + +#define CYREG_UDB_UDBPAIR2_UDBSNG0_RC_CFG0 0x4034245cu +#define CYREG_UDB_UDBPAIR2_UDBSNG1_RC_CFG0 0x403424dcu +#define CYREG_UDB_UDBPAIR3_UDBSNG0_RC_CFG0 0x4034265cu +#define CYREG_UDB_UDBPAIR3_UDBSNG1_RC_CFG0 0x403426dcu +#define CYREG_UDB_UDBPAIR4_UDBSNG0_RC_CFG0 0x4034285cu +#define CYREG_UDB_UDBPAIR4_UDBSNG1_RC_CFG0 0x403428dcu +#define CYREG_UDB_UDBPAIR5_UDBSNG0_RC_CFG0 0x40342a5cu +#define CYREG_UDB_UDBPAIR5_UDBSNG1_RC_CFG0 0x40342adcu + +#define CYDEV_UDB_UDBPAIR4_UDBSNG0_BASE 0x40342800u +#define CYDEV_UDB_UDBPAIR3_UDBSNG1_BASE 0x40342680u +#define CYDEV_UDB_UDBPAIR1_UDBSNG1_BASE 0x40342280u +#define CYDEV_UDB_UDBPAIR0_UDBSNG0_BASE 0x40342000u + +#define CYDEV_UDB_UDBPAIR0_ROUTE_BASE 0x40342100u +#define CYDEV_UDB_UDBPAIR1_ROUTE_BASE 0x40342300u +#define CYDEV_UDB_UDBPAIR2_ROUTE_BASE 0x40342500u +#define CYDEV_UDB_UDBPAIR3_ROUTE_BASE 0x40342700u +#define CYDEV_UDB_UDBPAIR4_ROUTE_BASE 0x40342900u +#define CYDEV_UDB_UDBPAIR5_ROUTE_BASE 0x40342b00u + + +#define CYDEV_UDB_UDBPAIR2_UDBSNG0_BASE 0x40342400u +#define CYDEV_UDB_UDBPAIR2_UDBSNG1_BASE 0x40342480u +#define CYDEV_UDB_UDBPAIR3_UDBSNG0_BASE 0x40342600u +#define CYDEV_UDB_UDBPAIR4_UDBSNG1_BASE 0x40342880u +#define CYDEV_UDB_UDBPAIR5_UDBSNG0_BASE 0x40342a00u +#define CYDEV_UDB_UDBPAIR5_UDBSNG1_BASE 0x40342a80u + + +#define CYDEV_UDB_DSI0_BASE 0x40346000u +#define CYDEV_UDB_DSI1_BASE 0x40346080u +#define CYDEV_UDB_DSI2_BASE 0x40346100u +#define CYDEV_UDB_DSI3_BASE 0x40346180u +#define CYDEV_UDB_DSI4_BASE 0x40346200u +#define CYDEV_UDB_DSI5_BASE 0x40346280u +#define CYDEV_UDB_DSI6_BASE 0x40346300u +#define CYDEV_UDB_DSI7_BASE 0x40346380u +#define CYDEV_UDB_DSI8_BASE 0x40346400u +#define CYDEV_UDB_DSI9_BASE 0x40346480u +#define CYDEV_UDB_DSI10_BASE 0x40346500u +#define CYDEV_UDB_DSI11_BASE 0x40346580u + +#define CYREG_UDB_UDBIF_INT_CLK_CTL 0x40347904u + +/*************Defines for UDBs from Creator*****************************/ +/***********These come for cyfitter.h**********************************/ + +/* TFT_DMA */ +#define TFT_DMA_DW__BLOCK_HW DW0 +#define TFT_DMA_DW__BLOCK_NUMBER 0u +#define TFT_DMA_DW__CHANNEL_HW DW0_CH_STRUCT2 +#define TFT_DMA_DW__CHANNEL_NUMBER 2u +#define TFT_DMA_DW__TR_IN TRIG0_OUT_CPUSS_DW0_TR_IN2 +#define TFT_DMA_DW__TR_OUT TRIG10_IN_CPUSS_DW0_TR_OUT2 + +/* TFT_CTRL */ +#define TFT_CTRL_Sync_ctrl_reg__0__MASK 0x01u +#define TFT_CTRL_Sync_ctrl_reg__0__POS 0 +#define TFT_CTRL_Sync_ctrl_reg__1__MASK 0x02u +#define TFT_CTRL_Sync_ctrl_reg__1__POS 1 +#define TFT_CTRL_Sync_ctrl_reg__2__MASK 0x04u +#define TFT_CTRL_Sync_ctrl_reg__2__POS 2 +#define TFT_CTRL_Sync_ctrl_reg__3__MASK 0x08u +#define TFT_CTRL_Sync_ctrl_reg__3__POS 3 +#define TFT_CTRL_Sync_ctrl_reg__4__MASK 0x10u +#define TFT_CTRL_Sync_ctrl_reg__4__POS 4 +#define TFT_CTRL_Sync_ctrl_reg__5__MASK 0x20u +#define TFT_CTRL_Sync_ctrl_reg__5__POS 5 +#define TFT_CTRL_Sync_ctrl_reg__6__MASK 0x40u +#define TFT_CTRL_Sync_ctrl_reg__6__POS 6 +#define TFT_CTRL_Sync_ctrl_reg__7__MASK 0x80u +#define TFT_CTRL_Sync_ctrl_reg__7__POS 7 +#define TFT_CTRL_Sync_ctrl_reg__CONTROL_AUX_CTL_REG 0x4034192Cu +#define TFT_CTRL_Sync_ctrl_reg__CONTROL_REG 0x4034172Cu +#define TFT_CTRL_Sync_ctrl_reg__CONTROL_ST_REG 0x4034032Cu +#define TFT_CTRL_Sync_ctrl_reg__COUNT_REG 0x4034172Cu +#define TFT_CTRL_Sync_ctrl_reg__COUNT_ST_REG 0x4034032Cu +#define TFT_CTRL_Sync_ctrl_reg__MASK 0xFFu +#define TFT_CTRL_Sync_ctrl_reg__MASK_CTL_AUX_CTL_REG 0x4034042Cu +#define TFT_CTRL_Sync_ctrl_reg__PER_CTL_AUX_CTL_REG 0x4034042Cu +#define TFT_CTRL_Sync_ctrl_reg__PERIOD_REG 0x4034182Cu +#define TFT_CTRL_Sync_ctrl_reg__RC_CFG0 0x40342ADCu +#define TFT_CTRL_Sync_ctrl_reg__RC_CFG1 0x40342AE0u +#define TFT_CTRL_Sync_ctrl_reg__SC_CFG0 0x40342AD4u +#define TFT_CTRL_Sync_ctrl_reg__SC_CFG1 0x40342AD8u + +/* SDIO_HOST */ +#define SDIO_HOST_bSDIO_blockCounter_u0__16BIT_A0_REG 0x4034101Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__16BIT_A1_REG 0x4034111Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__16BIT_D0_REG 0x4034121Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__16BIT_D1_REG 0x4034131Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__16BIT_DP_AUX_CTL_REG 0x4034191Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__16BIT_F0_REG 0x4034141Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__16BIT_F1_REG 0x4034151Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__32BIT_A0_REG 0x4034101Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__32BIT_A1_REG 0x4034111Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__32BIT_D0_REG 0x4034121Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__32BIT_D1_REG 0x4034131Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__32BIT_DP_AUX_CTL_REG 0x4034191Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__32BIT_F0_REG 0x4034141Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__32BIT_F1_REG 0x4034151Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__A0_A1_REG 0x4034001Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__A0_REG 0x4034101Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__A1_REG 0x4034111Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__D0_D1_REG 0x4034011Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__D0_REG 0x4034121Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__D1_REG 0x4034131Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__DP_AUX_CTL_REG 0x4034191Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__DPATH_CFG0 0x403426C0u +#define SDIO_HOST_bSDIO_blockCounter_u0__DPATH_CFG1 0x403426C4u +#define SDIO_HOST_bSDIO_blockCounter_u0__DPATH_CFG2 0x403426C8u +#define SDIO_HOST_bSDIO_blockCounter_u0__DPATH_CFG3 0x403426CCu +#define SDIO_HOST_bSDIO_blockCounter_u0__DPATH_CFG4 0x403426D0u +#define SDIO_HOST_bSDIO_blockCounter_u0__DPATH_OPC0 0x403426E4u +#define SDIO_HOST_bSDIO_blockCounter_u0__DPATH_OPC1 0x403426E8u +#define SDIO_HOST_bSDIO_blockCounter_u0__DPATH_OPC2 0x403426ECu +#define SDIO_HOST_bSDIO_blockCounter_u0__DPATH_OPC3 0x403426F0u +#define SDIO_HOST_bSDIO_blockCounter_u0__F0_F1_REG 0x4034021Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__F0_REG 0x4034141Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__F1_REG 0x4034151Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__MSK_DP_AUX_CTL_REG 0x4034041Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__PER_DP_AUX_CTL_REG 0x4034041Cu +#define SDIO_HOST_bSDIO_blockCounter_u0__RC_CFG0 0x403426DCu +#define SDIO_HOST_bSDIO_blockCounter_u0__RC_CFG1 0x403426E0u +#define SDIO_HOST_bSDIO_byteCounter__16BIT_CONTROL_AUX_CTL_REG 0x40341920u +#define SDIO_HOST_bSDIO_byteCounter__16BIT_CONTROL_CONTROL_REG 0x40341720u +#define SDIO_HOST_bSDIO_byteCounter__16BIT_CONTROL_COUNT_REG 0x40341720u +#define SDIO_HOST_bSDIO_byteCounter__16BIT_COUNT_CONTROL_REG 0x40341720u +#define SDIO_HOST_bSDIO_byteCounter__16BIT_COUNT_COUNT_REG 0x40341720u +#define SDIO_HOST_bSDIO_byteCounter__16BIT_MASK_MASK_REG 0x40341820u +#define SDIO_HOST_bSDIO_byteCounter__16BIT_MASK_PERIOD_REG 0x40341820u +#define SDIO_HOST_bSDIO_byteCounter__16BIT_PERIOD_MASK_REG 0x40341820u +#define SDIO_HOST_bSDIO_byteCounter__16BIT_PERIOD_PERIOD_REG 0x40341820u +#define SDIO_HOST_bSDIO_byteCounter__32BIT_CONTROL_AUX_CTL_REG 0x40341920u +#define SDIO_HOST_bSDIO_byteCounter__32BIT_CONTROL_REG 0x40341720u +#define SDIO_HOST_bSDIO_byteCounter__32BIT_COUNT_REG 0x40341720u +#define SDIO_HOST_bSDIO_byteCounter__32BIT_PERIOD_REG 0x40341820u +#define SDIO_HOST_bSDIO_byteCounter__CONTROL_AUX_CTL_REG 0x40341920u +#define SDIO_HOST_bSDIO_byteCounter__CONTROL_REG 0x40341720u +#define SDIO_HOST_bSDIO_byteCounter__CONTROL_ST_REG 0x40340320u +#define SDIO_HOST_bSDIO_byteCounter__COUNT_REG 0x40341720u +#define SDIO_HOST_bSDIO_byteCounter__COUNT_ST_REG 0x40340320u +#define SDIO_HOST_bSDIO_byteCounter__MASK_CTL_AUX_CTL_REG 0x40340420u +#define SDIO_HOST_bSDIO_byteCounter__PER_CTL_AUX_CTL_REG 0x40340420u +#define SDIO_HOST_bSDIO_byteCounter__PERIOD_REG 0x40341820u +#define SDIO_HOST_bSDIO_byteCounter__RC_CFG0 0x4034285Cu +#define SDIO_HOST_bSDIO_byteCounter__RC_CFG1 0x40342860u +#define SDIO_HOST_bSDIO_byteCounter__SC_CFG0 0x40342854u +#define SDIO_HOST_bSDIO_byteCounter__SC_CFG1 0x40342858u +#define SDIO_HOST_bSDIO_byteCounter_ST__16BIT_STATUS_AUX_CTL_REG 0x40341920u +#define SDIO_HOST_bSDIO_byteCounter_ST__16BIT_STATUS_REG 0x40341620u +#define SDIO_HOST_bSDIO_byteCounter_ST__32BIT_MASK_REG 0x40341820u +#define SDIO_HOST_bSDIO_byteCounter_ST__32BIT_STATUS_AUX_CTL_REG 0x40341920u +#define SDIO_HOST_bSDIO_byteCounter_ST__32BIT_STATUS_REG 0x40341620u +#define SDIO_HOST_bSDIO_byteCounter_ST__MASK_REG 0x40341820u +#define SDIO_HOST_bSDIO_byteCounter_ST__MASK_ST_AUX_CTL_REG 0x40340420u +#define SDIO_HOST_bSDIO_byteCounter_ST__PER_ST_AUX_CTL_REG 0x40340420u +#define SDIO_HOST_bSDIO_byteCounter_ST__RC_CFG0 0x4034285Cu +#define SDIO_HOST_bSDIO_byteCounter_ST__RC_CFG1 0x40342860u +#define SDIO_HOST_bSDIO_byteCounter_ST__SC_CFG0 0x40342854u +#define SDIO_HOST_bSDIO_byteCounter_ST__SC_CFG1 0x40342858u +#define SDIO_HOST_bSDIO_byteCounter_ST__STATUS_AUX_CTL_REG 0x40341920u +#define SDIO_HOST_bSDIO_byteCounter_ST__STATUS_CNT_REG 0x40340320u +#define SDIO_HOST_bSDIO_byteCounter_ST__STATUS_CONTROL_REG 0x40340320u +#define SDIO_HOST_bSDIO_byteCounter_ST__STATUS_REG 0x40341620u +#define SDIO_HOST_bSDIO_CMD__16BIT_A0_REG 0x40341018u +#define SDIO_HOST_bSDIO_CMD__16BIT_A1_REG 0x40341118u +#define SDIO_HOST_bSDIO_CMD__16BIT_D0_REG 0x40341218u +#define SDIO_HOST_bSDIO_CMD__16BIT_D1_REG 0x40341318u +#define SDIO_HOST_bSDIO_CMD__16BIT_DP_AUX_CTL_REG 0x40341918u +#define SDIO_HOST_bSDIO_CMD__16BIT_F0_REG 0x40341418u +#define SDIO_HOST_bSDIO_CMD__16BIT_F1_REG 0x40341518u +#define SDIO_HOST_bSDIO_CMD__32BIT_A0_REG 0x40341018u +#define SDIO_HOST_bSDIO_CMD__32BIT_A1_REG 0x40341118u +#define SDIO_HOST_bSDIO_CMD__32BIT_D0_REG 0x40341218u +#define SDIO_HOST_bSDIO_CMD__32BIT_D1_REG 0x40341318u +#define SDIO_HOST_bSDIO_CMD__32BIT_DP_AUX_CTL_REG 0x40341918u +#define SDIO_HOST_bSDIO_CMD__32BIT_F0_REG 0x40341418u +#define SDIO_HOST_bSDIO_CMD__32BIT_F1_REG 0x40341518u +#define SDIO_HOST_bSDIO_CMD__A0_A1_REG 0x40340018u +#define SDIO_HOST_bSDIO_CMD__A0_REG 0x40341018u +#define SDIO_HOST_bSDIO_CMD__A1_REG 0x40341118u +#define SDIO_HOST_bSDIO_CMD__D0_D1_REG 0x40340118u +#define SDIO_HOST_bSDIO_CMD__D0_REG 0x40341218u +#define SDIO_HOST_bSDIO_CMD__D1_REG 0x40341318u +#define SDIO_HOST_bSDIO_CMD__DP_AUX_CTL_REG 0x40341918u +#define SDIO_HOST_bSDIO_CMD__DPATH_CFG0 0x40342640u +#define SDIO_HOST_bSDIO_CMD__DPATH_CFG1 0x40342644u +#define SDIO_HOST_bSDIO_CMD__DPATH_CFG2 0x40342648u +#define SDIO_HOST_bSDIO_CMD__DPATH_CFG3 0x4034264Cu +#define SDIO_HOST_bSDIO_CMD__DPATH_CFG4 0x40342650u +#define SDIO_HOST_bSDIO_CMD__DPATH_OPC0 0x40342664u +#define SDIO_HOST_bSDIO_CMD__DPATH_OPC1 0x40342668u +#define SDIO_HOST_bSDIO_CMD__DPATH_OPC2 0x4034266Cu +#define SDIO_HOST_bSDIO_CMD__DPATH_OPC3 0x40342670u +#define SDIO_HOST_bSDIO_CMD__F0_F1_REG 0x40340218u +#define SDIO_HOST_bSDIO_CMD__F0_REG 0x40341418u +#define SDIO_HOST_bSDIO_CMD__F1_REG 0x40341518u +#define SDIO_HOST_bSDIO_CMD__RC_CFG0 0x4034265Cu +#define SDIO_HOST_bSDIO_CMD__RC_CFG1 0x40342660u +#define SDIO_HOST_bSDIO_cmdBitCounter__16BIT_CONTROL_AUX_CTL_REG 0x4034191Cu +#define SDIO_HOST_bSDIO_cmdBitCounter__16BIT_CONTROL_CONTROL_REG 0x4034171Cu +#define SDIO_HOST_bSDIO_cmdBitCounter__16BIT_CONTROL_COUNT_REG 0x4034171Cu +#define SDIO_HOST_bSDIO_cmdBitCounter__16BIT_COUNT_CONTROL_REG 0x4034171Cu +#define SDIO_HOST_bSDIO_cmdBitCounter__16BIT_COUNT_COUNT_REG 0x4034171Cu +#define SDIO_HOST_bSDIO_cmdBitCounter__16BIT_MASK_MASK_REG 0x4034181Cu +#define SDIO_HOST_bSDIO_cmdBitCounter__16BIT_MASK_PERIOD_REG 0x4034181Cu +#define SDIO_HOST_bSDIO_cmdBitCounter__16BIT_PERIOD_MASK_REG 0x4034181Cu +#define SDIO_HOST_bSDIO_cmdBitCounter__16BIT_PERIOD_PERIOD_REG 0x4034181Cu +#define SDIO_HOST_bSDIO_cmdBitCounter__32BIT_CONTROL_AUX_CTL_REG 0x4034191Cu +#define SDIO_HOST_bSDIO_cmdBitCounter__32BIT_CONTROL_REG 0x4034171Cu +#define SDIO_HOST_bSDIO_cmdBitCounter__32BIT_COUNT_REG 0x4034171Cu +#define SDIO_HOST_bSDIO_cmdBitCounter__32BIT_PERIOD_REG 0x4034181Cu +#define SDIO_HOST_bSDIO_cmdBitCounter__CONTROL_AUX_CTL_REG 0x4034191Cu +#define SDIO_HOST_bSDIO_cmdBitCounter__CONTROL_REG 0x4034171Cu +#define SDIO_HOST_bSDIO_cmdBitCounter__CONTROL_ST_REG 0x4034031Cu +#define SDIO_HOST_bSDIO_cmdBitCounter__COUNT_REG 0x4034171Cu +#define SDIO_HOST_bSDIO_cmdBitCounter__COUNT_ST_REG 0x4034031Cu +#define SDIO_HOST_bSDIO_cmdBitCounter__MASK_CTL_AUX_CTL_REG 0x4034041Cu +#define SDIO_HOST_bSDIO_cmdBitCounter__PER_CTL_AUX_CTL_REG 0x4034041Cu +#define SDIO_HOST_bSDIO_cmdBitCounter__PERIOD_REG 0x4034181Cu +#define SDIO_HOST_bSDIO_cmdBitCounter__RC_CFG0 0x403426DCu +#define SDIO_HOST_bSDIO_cmdBitCounter__RC_CFG1 0x403426E0u +#define SDIO_HOST_bSDIO_cmdBitCounter__SC_CFG0 0x403426D4u +#define SDIO_HOST_bSDIO_cmdBitCounter__SC_CFG1 0x403426D8u +#define SDIO_HOST_bSDIO_cmdBitCounter_ST__16BIT_STATUS_AUX_CTL_REG 0x4034191Cu +#define SDIO_HOST_bSDIO_cmdBitCounter_ST__16BIT_STATUS_REG 0x4034161Cu +#define SDIO_HOST_bSDIO_cmdBitCounter_ST__32BIT_MASK_REG 0x4034181Cu +#define SDIO_HOST_bSDIO_cmdBitCounter_ST__32BIT_STATUS_AUX_CTL_REG 0x4034191Cu +#define SDIO_HOST_bSDIO_cmdBitCounter_ST__32BIT_STATUS_REG 0x4034161Cu +#define SDIO_HOST_bSDIO_cmdBitCounter_ST__MASK_REG 0x4034181Cu +#define SDIO_HOST_bSDIO_cmdBitCounter_ST__MASK_ST_AUX_CTL_REG 0x4034041Cu +#define SDIO_HOST_bSDIO_cmdBitCounter_ST__PER_ST_AUX_CTL_REG 0x4034041Cu +#define SDIO_HOST_bSDIO_cmdBitCounter_ST__RC_CFG0 0x403426DCu +#define SDIO_HOST_bSDIO_cmdBitCounter_ST__RC_CFG1 0x403426E0u +#define SDIO_HOST_bSDIO_cmdBitCounter_ST__SC_CFG0 0x403426D4u +#define SDIO_HOST_bSDIO_cmdBitCounter_ST__SC_CFG1 0x403426D8u +#define SDIO_HOST_bSDIO_cmdBitCounter_ST__STATUS_AUX_CTL_REG 0x4034191Cu +#define SDIO_HOST_bSDIO_cmdBitCounter_ST__STATUS_CNT_REG 0x4034031Cu +#define SDIO_HOST_bSDIO_cmdBitCounter_ST__STATUS_CONTROL_REG 0x4034031Cu +#define SDIO_HOST_bSDIO_cmdBitCounter_ST__STATUS_REG 0x4034161Cu +#define SDIO_HOST_bSDIO_crcBitCounter__16BIT_CONTROL_AUX_CTL_REG 0x40341928u +#define SDIO_HOST_bSDIO_crcBitCounter__16BIT_CONTROL_CONTROL_REG 0x40341728u +#define SDIO_HOST_bSDIO_crcBitCounter__16BIT_CONTROL_COUNT_REG 0x40341728u +#define SDIO_HOST_bSDIO_crcBitCounter__16BIT_COUNT_CONTROL_REG 0x40341728u +#define SDIO_HOST_bSDIO_crcBitCounter__16BIT_COUNT_COUNT_REG 0x40341728u +#define SDIO_HOST_bSDIO_crcBitCounter__16BIT_MASK_MASK_REG 0x40341828u +#define SDIO_HOST_bSDIO_crcBitCounter__16BIT_MASK_PERIOD_REG 0x40341828u +#define SDIO_HOST_bSDIO_crcBitCounter__16BIT_PERIOD_MASK_REG 0x40341828u +#define SDIO_HOST_bSDIO_crcBitCounter__16BIT_PERIOD_PERIOD_REG 0x40341828u +#define SDIO_HOST_bSDIO_crcBitCounter__CONTROL_AUX_CTL_REG 0x40341928u +#define SDIO_HOST_bSDIO_crcBitCounter__CONTROL_REG 0x40341728u +#define SDIO_HOST_bSDIO_crcBitCounter__CONTROL_ST_REG 0x40340328u +#define SDIO_HOST_bSDIO_crcBitCounter__COUNT_REG 0x40341728u +#define SDIO_HOST_bSDIO_crcBitCounter__COUNT_ST_REG 0x40340328u +#define SDIO_HOST_bSDIO_crcBitCounter__MASK_CTL_AUX_CTL_REG 0x40340428u +#define SDIO_HOST_bSDIO_crcBitCounter__PER_CTL_AUX_CTL_REG 0x40340428u +#define SDIO_HOST_bSDIO_crcBitCounter__PERIOD_REG 0x40341828u +#define SDIO_HOST_bSDIO_crcBitCounter__RC_CFG0 0x40342A5Cu +#define SDIO_HOST_bSDIO_crcBitCounter__RC_CFG1 0x40342A60u +#define SDIO_HOST_bSDIO_crcBitCounter__SC_CFG0 0x40342A54u +#define SDIO_HOST_bSDIO_crcBitCounter__SC_CFG1 0x40342A58u +#define SDIO_HOST_bSDIO_crcBitCounter_ST__16BIT_STATUS_AUX_CTL_REG 0x40341928u +#define SDIO_HOST_bSDIO_crcBitCounter_ST__16BIT_STATUS_REG 0x40341628u +#define SDIO_HOST_bSDIO_crcBitCounter_ST__MASK_REG 0x40341828u +#define SDIO_HOST_bSDIO_crcBitCounter_ST__MASK_ST_AUX_CTL_REG 0x40340428u +#define SDIO_HOST_bSDIO_crcBitCounter_ST__PER_ST_AUX_CTL_REG 0x40340428u +#define SDIO_HOST_bSDIO_crcBitCounter_ST__RC_CFG0 0x40342A5Cu +#define SDIO_HOST_bSDIO_crcBitCounter_ST__RC_CFG1 0x40342A60u +#define SDIO_HOST_bSDIO_crcBitCounter_ST__SC_CFG0 0x40342A54u +#define SDIO_HOST_bSDIO_crcBitCounter_ST__SC_CFG1 0x40342A58u +#define SDIO_HOST_bSDIO_crcBitCounter_ST__STATUS_AUX_CTL_REG 0x40341928u +#define SDIO_HOST_bSDIO_crcBitCounter_ST__STATUS_CNT_REG 0x40340328u +#define SDIO_HOST_bSDIO_crcBitCounter_ST__STATUS_CONTROL_REG 0x40340328u +#define SDIO_HOST_bSDIO_crcBitCounter_ST__STATUS_REG 0x40341628u +#define SDIO_HOST_bSDIO_CtrlReg__0__MASK 0x01u +#define SDIO_HOST_bSDIO_CtrlReg__0__POS 0 +#define SDIO_HOST_bSDIO_CtrlReg__1__MASK 0x02u +#define SDIO_HOST_bSDIO_CtrlReg__1__POS 1 +#define SDIO_HOST_bSDIO_CtrlReg__16BIT_CONTROL_AUX_CTL_REG 0x40341914u +#define SDIO_HOST_bSDIO_CtrlReg__16BIT_CONTROL_CONTROL_REG 0x40341714u +#define SDIO_HOST_bSDIO_CtrlReg__16BIT_CONTROL_COUNT_REG 0x40341714u +#define SDIO_HOST_bSDIO_CtrlReg__16BIT_COUNT_CONTROL_REG 0x40341714u +#define SDIO_HOST_bSDIO_CtrlReg__16BIT_COUNT_COUNT_REG 0x40341714u +#define SDIO_HOST_bSDIO_CtrlReg__16BIT_MASK_MASK_REG 0x40341814u +#define SDIO_HOST_bSDIO_CtrlReg__16BIT_MASK_PERIOD_REG 0x40341814u +#define SDIO_HOST_bSDIO_CtrlReg__16BIT_PERIOD_MASK_REG 0x40341814u +#define SDIO_HOST_bSDIO_CtrlReg__16BIT_PERIOD_PERIOD_REG 0x40341814u +#define SDIO_HOST_bSDIO_CtrlReg__2__MASK 0x04u +#define SDIO_HOST_bSDIO_CtrlReg__2__POS 2 +#define SDIO_HOST_bSDIO_CtrlReg__3__MASK 0x08u +#define SDIO_HOST_bSDIO_CtrlReg__3__POS 3 +#define SDIO_HOST_bSDIO_CtrlReg__32BIT_CONTROL_AUX_CTL_REG 0x40341914u +#define SDIO_HOST_bSDIO_CtrlReg__32BIT_CONTROL_REG 0x40341714u +#define SDIO_HOST_bSDIO_CtrlReg__32BIT_COUNT_REG 0x40341714u +#define SDIO_HOST_bSDIO_CtrlReg__32BIT_PERIOD_REG 0x40341814u +#define SDIO_HOST_bSDIO_CtrlReg__4__MASK 0x10u +#define SDIO_HOST_bSDIO_CtrlReg__4__POS 4 +#define SDIO_HOST_bSDIO_CtrlReg__6__MASK 0x40u +#define SDIO_HOST_bSDIO_CtrlReg__6__POS 6 +#define SDIO_HOST_bSDIO_CtrlReg__7__MASK 0x80u +#define SDIO_HOST_bSDIO_CtrlReg__7__POS 7 +#define SDIO_HOST_bSDIO_CtrlReg__CONTROL_AUX_CTL_REG 0x40341914u +#define SDIO_HOST_bSDIO_CtrlReg__CONTROL_REG 0x40341714u +#define SDIO_HOST_bSDIO_CtrlReg__CONTROL_ST_REG 0x40340314u +#define SDIO_HOST_bSDIO_CtrlReg__COUNT_REG 0x40341714u +#define SDIO_HOST_bSDIO_CtrlReg__COUNT_ST_REG 0x40340314u +#define SDIO_HOST_bSDIO_CtrlReg__MASK 0xDFu +#define SDIO_HOST_bSDIO_CtrlReg__MASK_CTL_AUX_CTL_REG 0x40340414u +#define SDIO_HOST_bSDIO_CtrlReg__PER_CTL_AUX_CTL_REG 0x40340414u +#define SDIO_HOST_bSDIO_CtrlReg__PERIOD_REG 0x40341814u +#define SDIO_HOST_bSDIO_CtrlReg__RC_CFG0 0x403424DCu +#define SDIO_HOST_bSDIO_CtrlReg__RC_CFG1 0x403424E0u +#define SDIO_HOST_bSDIO_CtrlReg__SC_CFG0 0x403424D4u +#define SDIO_HOST_bSDIO_CtrlReg__SC_CFG1 0x403424D8u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__16BIT_A0_REG 0x40341000u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__16BIT_A1_REG 0x40341100u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__16BIT_D0_REG 0x40341200u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__16BIT_D1_REG 0x40341300u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__16BIT_DP_AUX_CTL_REG 0x40341900u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__16BIT_F0_REG 0x40341400u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__16BIT_F1_REG 0x40341500u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__32BIT_A0_REG 0x40341000u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__32BIT_A1_REG 0x40341100u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__32BIT_D0_REG 0x40341200u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__32BIT_D1_REG 0x40341300u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__32BIT_DP_AUX_CTL_REG 0x40341900u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__32BIT_F0_REG 0x40341400u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__32BIT_F1_REG 0x40341500u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__A0_A1_REG 0x40340000u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__A0_REG 0x40341000u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__A1_REG 0x40341100u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__D0_D1_REG 0x40340100u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__D0_REG 0x40341200u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__D1_REG 0x40341300u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__DP_AUX_CTL_REG 0x40341900u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__DPATH_CFG0 0x40342040u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__DPATH_CFG1 0x40342044u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__DPATH_CFG2 0x40342048u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__DPATH_CFG3 0x4034204Cu +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__DPATH_CFG4 0x40342050u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__DPATH_OPC0 0x40342064u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__DPATH_OPC1 0x40342068u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__DPATH_OPC2 0x4034206Cu +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__DPATH_OPC3 0x40342070u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__F0_F1_REG 0x40340200u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__F0_REG 0x40341400u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__F1_REG 0x40341500u +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__RC_CFG0 0x4034205Cu +#define SDIO_HOST_bSDIO_DAT_CRC0_u0__RC_CFG1 0x40342060u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__16BIT_A0_REG 0x40341004u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__16BIT_A1_REG 0x40341104u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__16BIT_D0_REG 0x40341204u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__16BIT_D1_REG 0x40341304u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__16BIT_DP_AUX_CTL_REG 0x40341904u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__16BIT_F0_REG 0x40341404u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__16BIT_F1_REG 0x40341504u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__32BIT_A0_REG 0x40341004u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__32BIT_A1_REG 0x40341104u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__32BIT_D0_REG 0x40341204u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__32BIT_D1_REG 0x40341304u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__32BIT_DP_AUX_CTL_REG 0x40341904u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__32BIT_F0_REG 0x40341404u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__32BIT_F1_REG 0x40341504u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__A0_A1_REG 0x40340004u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__A0_REG 0x40341004u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__A1_REG 0x40341104u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__D0_D1_REG 0x40340104u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__D0_REG 0x40341204u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__D1_REG 0x40341304u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__DP_AUX_CTL_REG 0x40341904u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__DPATH_CFG0 0x403420C0u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__DPATH_CFG1 0x403420C4u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__DPATH_CFG2 0x403420C8u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__DPATH_CFG3 0x403420CCu +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__DPATH_CFG4 0x403420D0u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__DPATH_OPC0 0x403420E4u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__DPATH_OPC1 0x403420E8u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__DPATH_OPC2 0x403420ECu +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__DPATH_OPC3 0x403420F0u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__F0_F1_REG 0x40340204u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__F0_REG 0x40341404u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__F1_REG 0x40341504u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__MSK_DP_AUX_CTL_REG 0x40340404u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__PER_DP_AUX_CTL_REG 0x40340404u +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__RC_CFG0 0x403420DCu +#define SDIO_HOST_bSDIO_DAT_CRC0_u1__RC_CFG1 0x403420E0u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__16BIT_A0_REG 0x40341010u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__16BIT_A1_REG 0x40341110u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__16BIT_D0_REG 0x40341210u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__16BIT_D1_REG 0x40341310u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__16BIT_DP_AUX_CTL_REG 0x40341910u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__16BIT_F0_REG 0x40341410u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__16BIT_F1_REG 0x40341510u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__32BIT_A0_REG 0x40341010u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__32BIT_A1_REG 0x40341110u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__32BIT_D0_REG 0x40341210u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__32BIT_D1_REG 0x40341310u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__32BIT_DP_AUX_CTL_REG 0x40341910u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__32BIT_F0_REG 0x40341410u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__32BIT_F1_REG 0x40341510u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__A0_A1_REG 0x40340010u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__A0_REG 0x40341010u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__A1_REG 0x40341110u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__D0_D1_REG 0x40340110u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__D0_REG 0x40341210u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__D1_REG 0x40341310u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__DP_AUX_CTL_REG 0x40341910u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__DPATH_CFG0 0x40342440u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__DPATH_CFG1 0x40342444u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__DPATH_CFG2 0x40342448u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__DPATH_CFG3 0x4034244Cu +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__DPATH_CFG4 0x40342450u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__DPATH_OPC0 0x40342464u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__DPATH_OPC1 0x40342468u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__DPATH_OPC2 0x4034246Cu +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__DPATH_OPC3 0x40342470u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__F0_F1_REG 0x40340210u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__F0_REG 0x40341410u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__F1_REG 0x40341510u +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__RC_CFG0 0x4034245Cu +#define SDIO_HOST_bSDIO_DAT_CRC1_u0__RC_CFG1 0x40342460u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__16BIT_A0_REG 0x40341014u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__16BIT_A1_REG 0x40341114u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__16BIT_D0_REG 0x40341214u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__16BIT_D1_REG 0x40341314u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__16BIT_DP_AUX_CTL_REG 0x40341914u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__16BIT_F0_REG 0x40341414u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__16BIT_F1_REG 0x40341514u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__32BIT_A0_REG 0x40341014u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__32BIT_A1_REG 0x40341114u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__32BIT_D0_REG 0x40341214u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__32BIT_D1_REG 0x40341314u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__32BIT_DP_AUX_CTL_REG 0x40341914u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__32BIT_F0_REG 0x40341414u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__32BIT_F1_REG 0x40341514u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__A0_A1_REG 0x40340014u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__A0_REG 0x40341014u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__A1_REG 0x40341114u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__D0_D1_REG 0x40340114u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__D0_REG 0x40341214u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__D1_REG 0x40341314u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__DP_AUX_CTL_REG 0x40341914u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__DPATH_CFG0 0x403424C0u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__DPATH_CFG1 0x403424C4u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__DPATH_CFG2 0x403424C8u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__DPATH_CFG3 0x403424CCu +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__DPATH_CFG4 0x403424D0u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__DPATH_OPC0 0x403424E4u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__DPATH_OPC1 0x403424E8u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__DPATH_OPC2 0x403424ECu +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__DPATH_OPC3 0x403424F0u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__F0_F1_REG 0x40340214u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__F0_REG 0x40341414u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__F1_REG 0x40341514u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__MSK_DP_AUX_CTL_REG 0x40340414u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__PER_DP_AUX_CTL_REG 0x40340414u +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__RC_CFG0 0x403424DCu +#define SDIO_HOST_bSDIO_DAT_CRC1_u1__RC_CFG1 0x403424E0u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__16BIT_A0_REG 0x40341028u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__16BIT_A1_REG 0x40341128u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__16BIT_D0_REG 0x40341228u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__16BIT_D1_REG 0x40341328u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__16BIT_DP_AUX_CTL_REG 0x40341928u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__16BIT_F0_REG 0x40341428u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__16BIT_F1_REG 0x40341528u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__A0_A1_REG 0x40340028u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__A0_REG 0x40341028u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__A1_REG 0x40341128u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__D0_D1_REG 0x40340128u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__D0_REG 0x40341228u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__D1_REG 0x40341328u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__DP_AUX_CTL_REG 0x40341928u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__DPATH_CFG0 0x40342A40u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__DPATH_CFG1 0x40342A44u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__DPATH_CFG2 0x40342A48u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__DPATH_CFG3 0x40342A4Cu +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__DPATH_CFG4 0x40342A50u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__DPATH_OPC0 0x40342A64u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__DPATH_OPC1 0x40342A68u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__DPATH_OPC2 0x40342A6Cu +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__DPATH_OPC3 0x40342A70u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__F0_F1_REG 0x40340228u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__F0_REG 0x40341428u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__F1_REG 0x40341528u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__MSK_DP_AUX_CTL_REG 0x40340428u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__PER_DP_AUX_CTL_REG 0x40340428u +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__RC_CFG0 0x40342A5Cu +#define SDIO_HOST_bSDIO_DAT_CRC2_u0__RC_CFG1 0x40342A60u +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__A0_A1_REG 0x4034002Cu +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__A0_REG 0x4034102Cu +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__A1_REG 0x4034112Cu +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__D0_D1_REG 0x4034012Cu +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__D0_REG 0x4034122Cu +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__D1_REG 0x4034132Cu +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__DP_AUX_CTL_REG 0x4034192Cu +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__DPATH_CFG0 0x40342AC0u +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__DPATH_CFG1 0x40342AC4u +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__DPATH_CFG2 0x40342AC8u +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__DPATH_CFG3 0x40342ACCu +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__DPATH_CFG4 0x40342AD0u +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__DPATH_OPC0 0x40342AE4u +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__DPATH_OPC1 0x40342AE8u +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__DPATH_OPC2 0x40342AECu +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__DPATH_OPC3 0x40342AF0u +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__F0_F1_REG 0x4034022Cu +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__F0_REG 0x4034142Cu +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__F1_REG 0x4034152Cu +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__MSK_DP_AUX_CTL_REG 0x4034042Cu +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__PER_DP_AUX_CTL_REG 0x4034042Cu +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__RC_CFG0 0x40342ADCu +#define SDIO_HOST_bSDIO_DAT_CRC2_u1__RC_CFG1 0x40342AE0u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__16BIT_A0_REG 0x40341020u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__16BIT_A1_REG 0x40341120u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__16BIT_D0_REG 0x40341220u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__16BIT_D1_REG 0x40341320u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__16BIT_DP_AUX_CTL_REG 0x40341920u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__16BIT_F0_REG 0x40341420u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__16BIT_F1_REG 0x40341520u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__32BIT_A0_REG 0x40341020u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__32BIT_A1_REG 0x40341120u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__32BIT_D0_REG 0x40341220u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__32BIT_D1_REG 0x40341320u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__32BIT_DP_AUX_CTL_REG 0x40341920u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__32BIT_F0_REG 0x40341420u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__32BIT_F1_REG 0x40341520u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__A0_A1_REG 0x40340020u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__A0_REG 0x40341020u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__A1_REG 0x40341120u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__D0_D1_REG 0x40340120u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__D0_REG 0x40341220u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__D1_REG 0x40341320u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__DP_AUX_CTL_REG 0x40341920u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__DPATH_CFG0 0x40342840u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__DPATH_CFG1 0x40342844u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__DPATH_CFG2 0x40342848u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__DPATH_CFG3 0x4034284Cu +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__DPATH_CFG4 0x40342850u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__DPATH_OPC0 0x40342864u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__DPATH_OPC1 0x40342868u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__DPATH_OPC2 0x4034286Cu +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__DPATH_OPC3 0x40342870u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__F0_F1_REG 0x40340220u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__F0_REG 0x40341420u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__F1_REG 0x40341520u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__MSK_DP_AUX_CTL_REG 0x40340420u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__PER_DP_AUX_CTL_REG 0x40340420u +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__RC_CFG0 0x4034285Cu +#define SDIO_HOST_bSDIO_DAT_CRC3_u0__RC_CFG1 0x40342860u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__16BIT_A0_REG 0x40341024u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__16BIT_A1_REG 0x40341124u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__16BIT_D0_REG 0x40341224u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__16BIT_D1_REG 0x40341324u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__16BIT_DP_AUX_CTL_REG 0x40341924u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__16BIT_F0_REG 0x40341424u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__16BIT_F1_REG 0x40341524u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__A0_A1_REG 0x40340024u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__A0_REG 0x40341024u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__A1_REG 0x40341124u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__D0_D1_REG 0x40340124u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__D0_REG 0x40341224u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__D1_REG 0x40341324u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__DP_AUX_CTL_REG 0x40341924u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__DPATH_CFG0 0x403428C0u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__DPATH_CFG1 0x403428C4u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__DPATH_CFG2 0x403428C8u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__DPATH_CFG3 0x403428CCu +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__DPATH_CFG4 0x403428D0u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__DPATH_OPC0 0x403428E4u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__DPATH_OPC1 0x403428E8u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__DPATH_OPC2 0x403428ECu +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__DPATH_OPC3 0x403428F0u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__F0_F1_REG 0x40340224u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__F0_REG 0x40341424u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__F1_REG 0x40341524u +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__RC_CFG0 0x403428DCu +#define SDIO_HOST_bSDIO_DAT_CRC3_u1__RC_CFG1 0x403428E0u +#define SDIO_HOST_bSDIO_Read_DP__16BIT_A0_REG 0x4034100Cu +#define SDIO_HOST_bSDIO_Read_DP__16BIT_A1_REG 0x4034110Cu +#define SDIO_HOST_bSDIO_Read_DP__16BIT_D0_REG 0x4034120Cu +#define SDIO_HOST_bSDIO_Read_DP__16BIT_D1_REG 0x4034130Cu +#define SDIO_HOST_bSDIO_Read_DP__16BIT_DP_AUX_CTL_REG 0x4034190Cu +#define SDIO_HOST_bSDIO_Read_DP__16BIT_F0_REG 0x4034140Cu +#define SDIO_HOST_bSDIO_Read_DP__16BIT_F1_REG 0x4034150Cu +#define SDIO_HOST_bSDIO_Read_DP__32BIT_A0_REG 0x4034100Cu +#define SDIO_HOST_bSDIO_Read_DP__32BIT_A1_REG 0x4034110Cu +#define SDIO_HOST_bSDIO_Read_DP__32BIT_D0_REG 0x4034120Cu +#define SDIO_HOST_bSDIO_Read_DP__32BIT_D1_REG 0x4034130Cu +#define SDIO_HOST_bSDIO_Read_DP__32BIT_DP_AUX_CTL_REG 0x4034190Cu +#define SDIO_HOST_bSDIO_Read_DP__32BIT_F0_REG 0x4034140Cu +#define SDIO_HOST_bSDIO_Read_DP__32BIT_F1_REG 0x4034150Cu +#define SDIO_HOST_bSDIO_Read_DP__A0_A1_REG 0x4034000Cu +#define SDIO_HOST_bSDIO_Read_DP__A0_REG 0x4034100Cu +#define SDIO_HOST_bSDIO_Read_DP__A1_REG 0x4034110Cu +#define SDIO_HOST_bSDIO_Read_DP__D0_D1_REG 0x4034010Cu +#define SDIO_HOST_bSDIO_Read_DP__D0_REG 0x4034120Cu +#define SDIO_HOST_bSDIO_Read_DP__D1_REG 0x4034130Cu +#define SDIO_HOST_bSDIO_Read_DP__DP_AUX_CTL_REG 0x4034190Cu +#define SDIO_HOST_bSDIO_Read_DP__DPATH_CFG0 0x403422C0u +#define SDIO_HOST_bSDIO_Read_DP__DPATH_CFG1 0x403422C4u +#define SDIO_HOST_bSDIO_Read_DP__DPATH_CFG2 0x403422C8u +#define SDIO_HOST_bSDIO_Read_DP__DPATH_CFG3 0x403422CCu +#define SDIO_HOST_bSDIO_Read_DP__DPATH_CFG4 0x403422D0u +#define SDIO_HOST_bSDIO_Read_DP__DPATH_OPC0 0x403422E4u +#define SDIO_HOST_bSDIO_Read_DP__DPATH_OPC1 0x403422E8u +#define SDIO_HOST_bSDIO_Read_DP__DPATH_OPC2 0x403422ECu +#define SDIO_HOST_bSDIO_Read_DP__DPATH_OPC3 0x403422F0u +#define SDIO_HOST_bSDIO_Read_DP__F0_F1_REG 0x4034020Cu +#define SDIO_HOST_bSDIO_Read_DP__F0_REG 0x4034140Cu +#define SDIO_HOST_bSDIO_Read_DP__F1_REG 0x4034150Cu +#define SDIO_HOST_bSDIO_Read_DP__RC_CFG0 0x403422DCu +#define SDIO_HOST_bSDIO_Read_DP__RC_CFG1 0x403422E0u +#define SDIO_HOST_bSDIO_Read_DP_PI__16BIT_STATUS_AUX_CTL_REG 0x4034190Cu +#define SDIO_HOST_bSDIO_Read_DP_PI__16BIT_STATUS_REG 0x4034160Cu +#define SDIO_HOST_bSDIO_Read_DP_PI__32BIT_MASK_REG 0x4034180Cu +#define SDIO_HOST_bSDIO_Read_DP_PI__32BIT_STATUS_AUX_CTL_REG 0x4034190Cu +#define SDIO_HOST_bSDIO_Read_DP_PI__32BIT_STATUS_REG 0x4034160Cu +#define SDIO_HOST_bSDIO_Read_DP_PI__MASK_REG 0x4034180Cu +#define SDIO_HOST_bSDIO_Read_DP_PI__RC_CFG0 0x403422DCu +#define SDIO_HOST_bSDIO_Read_DP_PI__RC_CFG1 0x403422E0u +#define SDIO_HOST_bSDIO_Read_DP_PI__SC_CFG0 0x403422D4u +#define SDIO_HOST_bSDIO_Read_DP_PI__SC_CFG1 0x403422D8u +#define SDIO_HOST_bSDIO_Read_DP_PI__STATUS_AUX_CTL_REG 0x4034190Cu +#define SDIO_HOST_bSDIO_Read_DP_PI__STATUS_REG 0x4034160Cu +#define SDIO_HOST_bSDIO_StatusReg__0__MASK 0x01u +#define SDIO_HOST_bSDIO_StatusReg__0__POS 0 +#define SDIO_HOST_bSDIO_StatusReg__1__MASK 0x02u +#define SDIO_HOST_bSDIO_StatusReg__1__POS 1 +#define SDIO_HOST_bSDIO_StatusReg__16BIT_STATUS_AUX_CTL_REG 0x40341914u +#define SDIO_HOST_bSDIO_StatusReg__16BIT_STATUS_REG 0x40341614u +#define SDIO_HOST_bSDIO_StatusReg__2__MASK 0x04u +#define SDIO_HOST_bSDIO_StatusReg__2__POS 2 +#define SDIO_HOST_bSDIO_StatusReg__3__MASK 0x08u +#define SDIO_HOST_bSDIO_StatusReg__3__POS 3 +#define SDIO_HOST_bSDIO_StatusReg__32BIT_MASK_REG 0x40341814u +#define SDIO_HOST_bSDIO_StatusReg__32BIT_STATUS_AUX_CTL_REG 0x40341914u +#define SDIO_HOST_bSDIO_StatusReg__32BIT_STATUS_REG 0x40341614u +#define SDIO_HOST_bSDIO_StatusReg__6__MASK 0x40u +#define SDIO_HOST_bSDIO_StatusReg__6__POS 6 +#define SDIO_HOST_bSDIO_StatusReg__MASK 0x4Fu +#define SDIO_HOST_bSDIO_StatusReg__MASK_REG 0x40341814u +#define SDIO_HOST_bSDIO_StatusReg__MASK_ST_AUX_CTL_REG 0x40340414u +#define SDIO_HOST_bSDIO_StatusReg__PER_ST_AUX_CTL_REG 0x40340414u +#define SDIO_HOST_bSDIO_StatusReg__RC_CFG0 0x403424DCu +#define SDIO_HOST_bSDIO_StatusReg__RC_CFG1 0x403424E0u +#define SDIO_HOST_bSDIO_StatusReg__SC_CFG0 0x403424D4u +#define SDIO_HOST_bSDIO_StatusReg__SC_CFG1 0x403424D8u +#define SDIO_HOST_bSDIO_StatusReg__STATUS_AUX_CTL_REG 0x40341914u +#define SDIO_HOST_bSDIO_StatusReg__STATUS_CNT_REG 0x40340314u +#define SDIO_HOST_bSDIO_StatusReg__STATUS_CONTROL_REG 0x40340314u +#define SDIO_HOST_bSDIO_StatusReg__STATUS_REG 0x40341614u +#define SDIO_HOST_bSDIO_Write_DP__16BIT_A0_REG 0x40341008u +#define SDIO_HOST_bSDIO_Write_DP__16BIT_A1_REG 0x40341108u +#define SDIO_HOST_bSDIO_Write_DP__16BIT_D0_REG 0x40341208u +#define SDIO_HOST_bSDIO_Write_DP__16BIT_D1_REG 0x40341308u +#define SDIO_HOST_bSDIO_Write_DP__16BIT_DP_AUX_CTL_REG 0x40341908u +#define SDIO_HOST_bSDIO_Write_DP__16BIT_F0_REG 0x40341408u +#define SDIO_HOST_bSDIO_Write_DP__16BIT_F1_REG 0x40341508u +#define SDIO_HOST_bSDIO_Write_DP__32BIT_A0_REG 0x40341008u +#define SDIO_HOST_bSDIO_Write_DP__32BIT_A1_REG 0x40341108u +#define SDIO_HOST_bSDIO_Write_DP__32BIT_D0_REG 0x40341208u +#define SDIO_HOST_bSDIO_Write_DP__32BIT_D1_REG 0x40341308u +#define SDIO_HOST_bSDIO_Write_DP__32BIT_DP_AUX_CTL_REG 0x40341908u +#define SDIO_HOST_bSDIO_Write_DP__32BIT_F0_REG 0x40341408u +#define SDIO_HOST_bSDIO_Write_DP__32BIT_F1_REG 0x40341508u +#define SDIO_HOST_bSDIO_Write_DP__A0_A1_REG 0x40340008u +#define SDIO_HOST_bSDIO_Write_DP__A0_REG 0x40341008u +#define SDIO_HOST_bSDIO_Write_DP__A1_REG 0x40341108u +#define SDIO_HOST_bSDIO_Write_DP__D0_D1_REG 0x40340108u +#define SDIO_HOST_bSDIO_Write_DP__D0_REG 0x40341208u +#define SDIO_HOST_bSDIO_Write_DP__D1_REG 0x40341308u +#define SDIO_HOST_bSDIO_Write_DP__DP_AUX_CTL_REG 0x40341908u +#define SDIO_HOST_bSDIO_Write_DP__DPATH_CFG0 0x40342240u +#define SDIO_HOST_bSDIO_Write_DP__DPATH_CFG1 0x40342244u +#define SDIO_HOST_bSDIO_Write_DP__DPATH_CFG2 0x40342248u +#define SDIO_HOST_bSDIO_Write_DP__DPATH_CFG3 0x4034224Cu +#define SDIO_HOST_bSDIO_Write_DP__DPATH_CFG4 0x40342250u +#define SDIO_HOST_bSDIO_Write_DP__DPATH_OPC0 0x40342264u +#define SDIO_HOST_bSDIO_Write_DP__DPATH_OPC1 0x40342268u +#define SDIO_HOST_bSDIO_Write_DP__DPATH_OPC2 0x4034226Cu +#define SDIO_HOST_bSDIO_Write_DP__DPATH_OPC3 0x40342270u +#define SDIO_HOST_bSDIO_Write_DP__F0_F1_REG 0x40340208u +#define SDIO_HOST_bSDIO_Write_DP__F0_REG 0x40341408u +#define SDIO_HOST_bSDIO_Write_DP__F1_REG 0x40341508u +#define SDIO_HOST_bSDIO_Write_DP__MSK_DP_AUX_CTL_REG 0x40340408u +#define SDIO_HOST_bSDIO_Write_DP__PER_DP_AUX_CTL_REG 0x40340408u +#define SDIO_HOST_bSDIO_Write_DP__RC_CFG0 0x4034225Cu +#define SDIO_HOST_bSDIO_Write_DP__RC_CFG1 0x40342260u +#define SDIO_HOST_bSDIO_Write_DP_PO__16BIT_CONTROL_AUX_CTL_REG 0x40341908u +#define SDIO_HOST_bSDIO_Write_DP_PO__16BIT_CONTROL_CONTROL_REG 0x40341708u +#define SDIO_HOST_bSDIO_Write_DP_PO__16BIT_CONTROL_COUNT_REG 0x40341708u +#define SDIO_HOST_bSDIO_Write_DP_PO__16BIT_COUNT_CONTROL_REG 0x40341708u +#define SDIO_HOST_bSDIO_Write_DP_PO__16BIT_COUNT_COUNT_REG 0x40341708u +#define SDIO_HOST_bSDIO_Write_DP_PO__16BIT_MASK_MASK_REG 0x40341808u +#define SDIO_HOST_bSDIO_Write_DP_PO__16BIT_MASK_PERIOD_REG 0x40341808u +#define SDIO_HOST_bSDIO_Write_DP_PO__16BIT_PERIOD_MASK_REG 0x40341808u +#define SDIO_HOST_bSDIO_Write_DP_PO__16BIT_PERIOD_PERIOD_REG 0x40341808u +#define SDIO_HOST_bSDIO_Write_DP_PO__32BIT_CONTROL_AUX_CTL_REG 0x40341908u +#define SDIO_HOST_bSDIO_Write_DP_PO__32BIT_CONTROL_REG 0x40341708u +#define SDIO_HOST_bSDIO_Write_DP_PO__32BIT_COUNT_REG 0x40341708u +#define SDIO_HOST_bSDIO_Write_DP_PO__32BIT_PERIOD_REG 0x40341808u +#define SDIO_HOST_bSDIO_Write_DP_PO__CONTROL_AUX_CTL_REG 0x40341908u +#define SDIO_HOST_bSDIO_Write_DP_PO__CONTROL_REG 0x40341708u +#define SDIO_HOST_bSDIO_Write_DP_PO__CONTROL_ST_REG 0x40340308u +#define SDIO_HOST_bSDIO_Write_DP_PO__COUNT_REG 0x40341708u +#define SDIO_HOST_bSDIO_Write_DP_PO__COUNT_ST_REG 0x40340308u +#define SDIO_HOST_bSDIO_Write_DP_PO__MASK_CTL_AUX_CTL_REG 0x40340408u +#define SDIO_HOST_bSDIO_Write_DP_PO__PER_CTL_AUX_CTL_REG 0x40340408u +#define SDIO_HOST_bSDIO_Write_DP_PO__PERIOD_REG 0x40341808u +#define SDIO_HOST_bSDIO_Write_DP_PO__RC_CFG0 0x4034225Cu +#define SDIO_HOST_bSDIO_Write_DP_PO__RC_CFG1 0x40342260u +#define SDIO_HOST_bSDIO_Write_DP_PO__SC_CFG0 0x40342254u +#define SDIO_HOST_bSDIO_Write_DP_PO__SC_CFG1 0x40342258u +#define SDIO_HOST_bSDIO_writeCrcCounter__16BIT_CONTROL_AUX_CTL_REG 0x40341904u +#define SDIO_HOST_bSDIO_writeCrcCounter__16BIT_CONTROL_CONTROL_REG 0x40341704u +#define SDIO_HOST_bSDIO_writeCrcCounter__16BIT_CONTROL_COUNT_REG 0x40341704u +#define SDIO_HOST_bSDIO_writeCrcCounter__16BIT_COUNT_CONTROL_REG 0x40341704u +#define SDIO_HOST_bSDIO_writeCrcCounter__16BIT_COUNT_COUNT_REG 0x40341704u +#define SDIO_HOST_bSDIO_writeCrcCounter__16BIT_MASK_MASK_REG 0x40341804u +#define SDIO_HOST_bSDIO_writeCrcCounter__16BIT_MASK_PERIOD_REG 0x40341804u +#define SDIO_HOST_bSDIO_writeCrcCounter__16BIT_PERIOD_MASK_REG 0x40341804u +#define SDIO_HOST_bSDIO_writeCrcCounter__16BIT_PERIOD_PERIOD_REG 0x40341804u +#define SDIO_HOST_bSDIO_writeCrcCounter__32BIT_CONTROL_AUX_CTL_REG 0x40341904u +#define SDIO_HOST_bSDIO_writeCrcCounter__32BIT_CONTROL_REG 0x40341704u +#define SDIO_HOST_bSDIO_writeCrcCounter__32BIT_COUNT_REG 0x40341704u +#define SDIO_HOST_bSDIO_writeCrcCounter__32BIT_PERIOD_REG 0x40341804u +#define SDIO_HOST_bSDIO_writeCrcCounter__CONTROL_AUX_CTL_REG 0x40341904u +#define SDIO_HOST_bSDIO_writeCrcCounter__CONTROL_REG 0x40341704u +#define SDIO_HOST_bSDIO_writeCrcCounter__CONTROL_ST_REG 0x40340304u +#define SDIO_HOST_bSDIO_writeCrcCounter__COUNT_REG 0x40341704u +#define SDIO_HOST_bSDIO_writeCrcCounter__COUNT_ST_REG 0x40340304u +#define SDIO_HOST_bSDIO_writeCrcCounter__MASK_CTL_AUX_CTL_REG 0x40340404u +#define SDIO_HOST_bSDIO_writeCrcCounter__PER_CTL_AUX_CTL_REG 0x40340404u +#define SDIO_HOST_bSDIO_writeCrcCounter__PERIOD_REG 0x40341804u +#define SDIO_HOST_bSDIO_writeCrcCounter__RC_CFG0 0x403420DCu +#define SDIO_HOST_bSDIO_writeCrcCounter__RC_CFG1 0x403420E0u +#define SDIO_HOST_bSDIO_writeCrcCounter__SC_CFG0 0x403420D4u +#define SDIO_HOST_bSDIO_writeCrcCounter__SC_CFG1 0x403420D8u +#define SDIO_HOST_bSDIO_writeCrcCounter_ST__16BIT_STATUS_AUX_CTL_REG 0x40341904u +#define SDIO_HOST_bSDIO_writeCrcCounter_ST__16BIT_STATUS_REG 0x40341604u +#define SDIO_HOST_bSDIO_writeCrcCounter_ST__32BIT_MASK_REG 0x40341804u +#define SDIO_HOST_bSDIO_writeCrcCounter_ST__32BIT_STATUS_AUX_CTL_REG 0x40341904u +#define SDIO_HOST_bSDIO_writeCrcCounter_ST__32BIT_STATUS_REG 0x40341604u +#define SDIO_HOST_bSDIO_writeCrcCounter_ST__MASK_REG 0x40341804u +#define SDIO_HOST_bSDIO_writeCrcCounter_ST__MASK_ST_AUX_CTL_REG 0x40340404u +#define SDIO_HOST_bSDIO_writeCrcCounter_ST__PER_ST_AUX_CTL_REG 0x40340404u +#define SDIO_HOST_bSDIO_writeCrcCounter_ST__RC_CFG0 0x403420DCu +#define SDIO_HOST_bSDIO_writeCrcCounter_ST__RC_CFG1 0x403420E0u +#define SDIO_HOST_bSDIO_writeCrcCounter_ST__SC_CFG0 0x403420D4u +#define SDIO_HOST_bSDIO_writeCrcCounter_ST__SC_CFG1 0x403420D8u +#define SDIO_HOST_bSDIO_writeCrcCounter_ST__STATUS_AUX_CTL_REG 0x40341904u +#define SDIO_HOST_bSDIO_writeCrcCounter_ST__STATUS_CNT_REG 0x40340304u +#define SDIO_HOST_bSDIO_writeCrcCounter_ST__STATUS_CONTROL_REG 0x40340304u +#define SDIO_HOST_bSDIO_writeCrcCounter_ST__STATUS_REG 0x40341604u +#define SDIO_HOST_CMD_DMA_DW__BLOCK_HW DW0 +#define SDIO_HOST_CMD_DMA_DW__BLOCK_NUMBER 0u +#define SDIO_HOST_CMD_DMA_DW__CHANNEL_HW DW0_CH_STRUCT1 +#define SDIO_HOST_CMD_DMA_DW__CHANNEL_NUMBER 1u +#define SDIO_HOST_CMD_DMA_DW__TR_IN TRIG0_OUT_CPUSS_DW0_TR_IN1 +#define SDIO_HOST_Internal_Clock__DIV_IDX 0 +#define SDIO_HOST_Internal_Clock__DIV_NUM 0 +#define SDIO_HOST_Internal_Clock__DIV_TYPE CY_SYSCLK_DIV_8_BIT +#define SDIO_HOST_Read_DMA_DW__BLOCK_HW DW1 +#define SDIO_HOST_Read_DMA_DW__BLOCK_NUMBER 1u +#define SDIO_HOST_Read_DMA_DW__CHANNEL_HW DW1_CH_STRUCT3 +#define SDIO_HOST_Read_DMA_DW__CHANNEL_NUMBER 3u +#define SDIO_HOST_Read_DMA_DW__TR_IN TRIG1_OUT_CPUSS_DW1_TR_IN3 +#define SDIO_HOST_Resp_DMA_DW__BLOCK_HW DW0 +#define SDIO_HOST_Resp_DMA_DW__BLOCK_NUMBER 0u +#define SDIO_HOST_Resp_DMA_DW__CHANNEL_HW DW0_CH_STRUCT0 +#define SDIO_HOST_Resp_DMA_DW__CHANNEL_NUMBER 0u +#define SDIO_HOST_Resp_DMA_DW__TR_IN TRIG0_OUT_CPUSS_DW0_TR_IN0 +#define SDIO_HOST_Write_DMA_DW__BLOCK_HW DW1 +#define SDIO_HOST_Write_DMA_DW__BLOCK_NUMBER 1u +#define SDIO_HOST_Write_DMA_DW__CHANNEL_HW DW1_CH_STRUCT1 +#define SDIO_HOST_Write_DMA_DW__CHANNEL_NUMBER 1u +#define SDIO_HOST_Write_DMA_DW__TR_IN TRIG1_OUT_CPUSS_DW1_TR_IN1 + + +/***************************CMD DMA***************************************/ +#define SDIO_HOST_CMD_DMA_DW_BLOCK (0u) +#define SDIO_HOST_CMD_DMA_DW_CHANNEL (1u) +#define SDIO_HOST_CMD_DMA_HW (DW0) +#define SDIO_HOST_CMD_DMA_INTR_MASK (CY_DMA_INTR_MASK) + +/* Channel settings */ +#define SDIO_HOST_CMD_DMA_PRIORITY (1u) +#define SDIO_HOST_CMD_DMA_DESCRIPTOR_NUM (1u) +#define SDIO_HOST_CMD_DMA_PREEMPTABLE (true) + +extern cy_stc_dma_descriptor_config_t SDIO_HOST_CMD_DMA_CMD_DMA_Desc_config; +extern cy_stc_dma_descriptor_t SDIO_HOST_CMD_DMA_CMD_DMA_Desc; + +/***************************Read DMA***************************************/ +#define SDIO_HOST_Read_DMA_DW_BLOCK (1u) +#define SDIO_HOST_Read_DMA_DW_CHANNEL (3u) +#define SDIO_HOST_Read_DMA_HW (DW1) +#define SDIO_HOST_Read_DMA_INTR_MASK (CY_DMA_INTR_MASK) + +/* Channel settings */ +#define SDIO_HOST_Read_DMA_PRIORITY (0u) +#define SDIO_HOST_Read_DMA_DESCRIPTOR_NUM (1u) +#define SDIO_HOST_Read_DMA_PREEMPTABLE (false) + +extern cy_stc_dma_descriptor_config_t SDIO_HOST_Read_DMA_Read_DMA_Desc_config; +extern cy_stc_dma_descriptor_t SDIO_HOST_Read_DMA_Read_DMA_Desc; + +/***************************Resp DMA***************************************/ +#define SDIO_HOST_Resp_DMA_DW_BLOCK (0u) +#define SDIO_HOST_Resp_DMA_DW_CHANNEL (0u) +#define SDIO_HOST_Resp_DMA_HW (DW0) +#define SDIO_HOST_Resp_DMA_INTR_MASK (CY_DMA_INTR_MASK) + +/* Channel settings */ +#define SDIO_HOST_Resp_DMA_PRIORITY (1u) +#define SDIO_HOST_Resp_DMA_DESCRIPTOR_NUM (1u) +#define SDIO_HOST_Resp_DMA_PREEMPTABLE (true) + +extern cy_stc_dma_descriptor_config_t SDIO_HOST_Resp_DMA_Resp_DMA_Desc_config; +extern cy_stc_dma_descriptor_t SDIO_HOST_Resp_DMA_Resp_DMA_Desc; + +/***************************Write DMA***************************************/ +#define SDIO_HOST_Write_DMA_DW_BLOCK (1u) +#define SDIO_HOST_Write_DMA_DW_CHANNEL (1u) +#define SDIO_HOST_Write_DMA_HW (DW1) +#define SDIO_HOST_Write_DMA_INTR_MASK (CY_DMA_INTR_MASK) + +/* Channel settings */ +#define SDIO_HOST_Write_DMA_PRIORITY (0u) +#define SDIO_HOST_Write_DMA_DESCRIPTOR_NUM (1u) +#define SDIO_HOST_Write_DMA_PREEMPTABLE (false) + +extern cy_stc_dma_descriptor_config_t SDIO_HOST_Write_DMA_Write_DMA_Desc_config; +extern cy_stc_dma_descriptor_t SDIO_HOST_Write_DMA_Write_DMA_Desc; + +/***************************SDIO Clock**************************************/ +/* The peripheral clock divider number */ +#define SDIO_HOST_Internal_Clock_DIV_NUM ((uint32_t)0) +/* The peripheral clock divider type */ +#define SDIO_HOST_Internal_Clock_DIV_TYPE ((cy_en_divider_types_t)CY_SYSCLK_DIV_8_BIT) + +/*Function for configuring TriggerMuxes*/ +void SDIO_Host_Config_TriggerMuxes(void); + +/*Function for configuring UDBs*/ +void SDIO_Host_Config_UDBs(void); + +/* SDIO_HOST_Read_Int */ +#define SDIO_HOST_Read_Int__INTC_CORTEXM4_ASSIGNED 1 +#define SDIO_HOST_Read_Int__INTC_CORTEXM4_PRIORITY 7u +#define SDIO_HOST_Read_Int__INTC_NUMBER 69u +#define SDIO_HOST_Read_Int_INTC_CORTEXM4_ASSIGNED 1 +#define SDIO_HOST_Read_Int_INTC_CORTEXM4_PRIORITY 7u +#define SDIO_HOST_Read_Int_INTC_NUMBER 69u + +/* SDIO_HOST_sdio_int */ +#define SDIO_HOST_sdio_int__INTC_CORTEXM4_ASSIGNED 1 +#define SDIO_HOST_sdio_int__INTC_CORTEXM4_PRIORITY 7u +#define SDIO_HOST_sdio_int__INTC_NUMBER 122u +#define SDIO_HOST_sdio_int_INTC_CORTEXM4_ASSIGNED 1 +#define SDIO_HOST_sdio_int_INTC_CORTEXM4_PRIORITY 7u +#define SDIO_HOST_sdio_int_INTC_NUMBER 122u + +/* SDIO_HOST_Write_Int */ +#define SDIO_HOST_Write_Int__INTC_CORTEXM4_ASSIGNED 1 +#define SDIO_HOST_Write_Int__INTC_CORTEXM4_PRIORITY 7u +#define SDIO_HOST_Write_Int__INTC_NUMBER 67u +#define SDIO_HOST_Write_Int_INTC_CORTEXM4_ASSIGNED 1 +#define SDIO_HOST_Write_Int_INTC_CORTEXM4_PRIORITY 7u +#define SDIO_HOST_Write_Int_INTC_NUMBER 67u + +#if defined(__cplusplus) +} +#endif + +#endif /* !defined(CY_SDIO_CFG_H) */ + +/* [] END OF FILE */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/cybsp.c b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/cybsp.c new file mode 100644 index 00000000000..50fa6b7dca3 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/cybsp.c @@ -0,0 +1,128 @@ +/***************************************************************************//** +* \file cybsp.c +* +* Description: +* Provides initialization code for starting up the hardware contained on the +* Cypress board. +* +******************************************************************************** +* \copyright +* Copyright 2018-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*******************************************************************************/ + +#include +#include "cy_syspm.h" +#include "cy_sysclk.h" +#include "cybsp.h" +#if defined(CY_USING_HAL) +#include "cyhal_hwmgr.h" +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + +/* The sysclk deep sleep callback is recommended to be the last callback that +* is executed before entry into deep sleep mode and the first one upon +* exit the deep sleep mode. +* Doing so minimizes the time spent on low power mode entry and exit. +*/ +#ifndef CYBSP_SYSCLK_PM_CALLBACK_ORDER + #define CYBSP_SYSCLK_PM_CALLBACK_ORDER (255u) +#endif + +#if defined(CYBSP_WIFI_CAPABLE) && defined(CY_USING_HAL) +static cyhal_sdio_t sdio_obj; + +cyhal_sdio_t* cybsp_get_wifi_sdio_obj(void) +{ + return &sdio_obj; +} +#endif + +/** + * Registers a power management callback that prepares the clock system + * for entering deep sleep mode and restore the clocks upon wakeup from deep sleep. + * NOTE: This is called automatically as part of \ref cybsp_init + */ +static cy_rslt_t cybsp_register_sysclk_pm_callback(void) +{ + cy_rslt_t result = CY_RSLT_SUCCESS; + static cy_stc_syspm_callback_params_t cybsp_sysclk_pm_callback_param = {NULL, NULL}; + static cy_stc_syspm_callback_t cybsp_sysclk_pm_callback = { + .callback = &Cy_SysClk_DeepSleepCallback, + .type = CY_SYSPM_DEEPSLEEP, + .callbackParams = &cybsp_sysclk_pm_callback_param, + .order = CYBSP_SYSCLK_PM_CALLBACK_ORDER + }; + + if (!Cy_SysPm_RegisterCallback(&cybsp_sysclk_pm_callback)) + { + result = CYBSP_RSLT_ERR_SYSCLK_PM_CALLBACK; + } + return result; +} + +cy_rslt_t cybsp_init(void) +{ + /* Setup hardware manager to track resource usage then initialize all system (clock/power) board configuration */ +#if defined(CY_USING_HAL) + cy_rslt_t result = cyhal_hwmgr_init(); +#else + cy_rslt_t result = CY_RSLT_SUCCESS; +#endif + +#if defined(COMPONENT_BSP_DESIGN_MODUS) + init_cycfg_all(); +#endif + + if (CY_RSLT_SUCCESS == result) + { + result = cybsp_register_sysclk_pm_callback(); + } + +#if defined(CYBSP_WIFI_CAPABLE) && defined(CY_USING_HAL) + /* Initialize SDIO interface. This must be done before other HAL API calls as some SDIO implementations require + * specific peripheral instances. + * NOTE: The full WiFi interface still needs to be initialized via cybsp_wifi_init_primary(). This is typically + * done when starting up WiFi. + */ + if (CY_RSLT_SUCCESS == result) + { + /* Reserves: CYBSP_WIFI_SDIO, CYBSP_WIFI_SDIO_D0, CYBSP_WIFI_SDIO_D1, CYBSP_WIFI_SDIO_D2, CYBSP_WIFI_SDIO_D3 + * CYBSP_WIFI_SDIO_CMD and CYBSP_WIFI_SDIO_CLK. + */ + result = cyhal_sdio_init( + &sdio_obj, + CYBSP_WIFI_SDIO_CMD, + CYBSP_WIFI_SDIO_CLK, + CYBSP_WIFI_SDIO_D0, + CYBSP_WIFI_SDIO_D1, + CYBSP_WIFI_SDIO_D2, + CYBSP_WIFI_SDIO_D3); + } +#endif /* defined(CYBSP_WIFI_CAPABLE) */ + + /* CYHAL_HWMGR_RSLT_ERR_INUSE error code could be returned if any needed for BSP resource was reserved by + * user previously. Please review the Device Configurator (design.modus) and the BSP reservation list + * (cyreservedresources.list) to make sure no resources are reserved by both. + */ + return result; +} + +#if defined(__cplusplus) +} +#endif diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/cybsp.h b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/cybsp.h new file mode 100644 index 00000000000..7d15280e71e --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/cybsp.h @@ -0,0 +1,76 @@ +/***************************************************************************//** +* \file cybsp.h +* +* \brief +* Basic API for setting up boards containing a Cypress MCU. +* +******************************************************************************** +* \copyright +* Copyright 2018-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*******************************************************************************/ + +#pragma once + +#include "cy_result.h" +#include "cybsp_types.h" +#if defined(COMPONENT_BSP_DESIGN_MODUS) +#include "cycfg.h" +#endif +#if defined(CYBSP_WIFI_CAPABLE) && defined(CY_USING_HAL) +#include "cyhal_sdio.h" +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + +/** +* \addtogroup group_bsp_macros Macros +* \{ +*/ + +/** Failed to configure sysclk power management callback */ +#define CYBSP_RSLT_ERR_SYSCLK_PM_CALLBACK (CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_ABSTRACTION_BSP, 0)) + +/** \} group_bsp_macros */ + +/** +* \addtogroup group_bsp_functions Functions +* \{ +*/ + +/** + * \brief Initialize all hardware on the board + * \returns CY_RSLT_SUCCESS if the board is sucessfully initialized, if there is + * a problem initializing any hardware it returns an error code specific + * to the hardware module that had a problem. + */ +cy_rslt_t cybsp_init(void); + +#if defined(CYBSP_WIFI_CAPABLE) && defined(CY_USING_HAL) +/** + * \brief Get the initialized sdio object used for communicating with the WiFi Chip. + * \note This function should only be called after cybsp_init(); + * \returns The initialized sdio object. + */ +cyhal_sdio_t* cybsp_get_wifi_sdio_obj(void); +#endif /* defined(CYBSP_WIFI_CAPABLE) */ + +/** \} group_bsp_functions */ + +#ifdef __cplusplus +} +#endif /* __cplusplus */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/cybsp_types.h b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/cybsp_types.h new file mode 100644 index 00000000000..f3b4128582d --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/cybsp_types.h @@ -0,0 +1,322 @@ +/***************************************************************************//** +* \file CYW9P62S1-43438EVB-01/cybsp_types.h +* +* Description: +* Provides APIs for interacting with the hardware contained on the Cypress +* CYW9P62S1-43438EVB-01 kit. +* +******************************************************************************** +* \copyright +* Copyright 2018-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*******************************************************************************/ + +#pragma once + +#if defined(CY_USING_HAL) +#include "cyhal_pin_package.h" +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + +/** +* \addtogroup group_bsp_settings BSP Settings +* \{ +* +*

Peripheral Default HAL Settings:
+* | Resource | Parameter | Value | Remarks | +* | :------: | :-------: | :---: | :------ | +* | ADC | VREF | 1.2 V | | +* | ^ | Measurement type | Single Ended | | +* | ^ | Input voltage range | 0 to 2.4 V (0 to 2*VREF) | | +* | ^ | Output range | 0x000 to 0x7FF | | +* | DAC | Reference source | VDDA | | +* | ^ | Input range | 0x000 to 0xFFF | | +* | ^ | Output range | 0 to VDDA | | +* | ^ | Output type | Unbuffered output | | +* | I2C | Role | Master | Configurable to slave mode through HAL function | +* | ^ | Data rate | 100 kbps | Configurable through HAL function | +* | ^ | Drive mode of SCL & SDA pins | Open Drain (drives low) | External pull-up resistors are required | +* | LpTimer | Uses WCO (32.768 kHz) as clock source & MCWDT as counter. 1 count = 1/32768 second or 32768 counts = 1 second. ||| +* | SPI | Data rate | 100 kpbs | Configurable through HAL function | +* | ^ | Slave select polarity | Active low | | +* | UART | Flow control | No flow control | Configurable through HAL function | +* | ^ | Data format | 8N1 | Configurable through HAL function | +* | ^ | Baud rate | 115200 | Configurable through HAL function | +*/ +/** \} group_bsp_settings */ + +/** +* \addtogroup group_bsp_pin_state Pin States +* \{ +*/ + +/** Pin state for the LED on. */ +#define CYBSP_LED_STATE_ON (0U) +/** Pin state for the LED off. */ +#define CYBSP_LED_STATE_OFF (1U) + +/** Pin state for when a button is pressed. */ +#define CYBSP_BTN_PRESSED (0U) +/** Pin state for when a button is released. */ +#define CYBSP_BTN_OFF (1U) + +/** \} group_bsp_pin_state */ + +#if defined(CY_USING_HAL) + +/** +* \addtogroup group_bsp_pins Pin Mappings +* \{ +*/ + +/** +* \addtogroup group_bsp_pins_led LED Pins +* \{ +*/ + +/** LED 8; User LED1 (orange) */ +#define CYBSP_LED8 (P1_5) +/** LED 9; User LED2 (red) */ +#define CYBSP_LED9 (P11_1) +/** LED 5: RGB LED - Red; User LED3 */ +#define CYBSP_LED_RGB_RED (P1_1) +/** LED 5: RGB LED - Green; User LED4 */ +#define CYBSP_LED_RGB_GREEN (P0_5) +/** LED 5: RGB LED - Blue; User LED5 */ +#define CYBSP_LED_RGB_BLUE (P7_3) + +/** LED 8; User LED1 (orange) */ +#define CYBSP_USER_LED1 (CYBSP_LED8) +/** LED 9; User LED2 (red) */ +#define CYBSP_USER_LED2 (CYBSP_LED9) +/** LED 5: RGB LED - Red; User LED3 */ +#define CYBSP_USER_LED3 (CYBSP_LED_RGB_RED) +/** LED 5: RGB LED - Green; User LED4 */ +#define CYBSP_USER_LED4 (CYBSP_LED_RGB_GREEN) +/** LED 5: RGB LED - Blue; User LED5 */ +#define CYBSP_USER_LED5 (CYBSP_LED_RGB_BLUE) +/** LED 8; User LED1 */ +#define CYBSP_USER_LED (CYBSP_USER_LED1) + +/** \} group_bsp_pins_led */ + +/** +* \addtogroup group_bsp_pins_btn Button Pins +* \{ +*/ + +/** Switch 2; User Button 1 */ +#define CYBSP_SW2 (P0_4) +/** Switch 4; User Button 2 */ +#define CYBSP_SW4 (P1_4) + +/** Switch 2; User Button 1 */ +#define CYBSP_USER_BTN1 (CYBSP_SW2) +/** Switch 4; User Button 2 */ +#define CYBSP_USER_BTN2 (CYBSP_SW4) +/** Switch 2; User Button 1 */ +#define CYBSP_USER_BTN (CYBSP_USER_BTN1) + +/** \} group_bsp_pins_btn */ + + +/** +* \addtogroup group_bsp_pins_comm Communication Pins +* \{ +*/ + +/** Pin: WIFI SDIO D0 */ +#define CYBSP_WIFI_SDIO_D0 (P2_0) +/** Pin: WIFI SDIO D1 */ +#define CYBSP_WIFI_SDIO_D1 (P2_1) +/** Pin: WIFI SDIO D2 */ +#define CYBSP_WIFI_SDIO_D2 (P2_2) +/** Pin: WIFI SDIO D3 */ +#define CYBSP_WIFI_SDIO_D3 (P2_3) +/** Pin: WIFI SDIO CMD */ +#define CYBSP_WIFI_SDIO_CMD (P2_4) +/** Pin: WIFI SDIO CLK */ +#define CYBSP_WIFI_SDIO_CLK (P2_5) +/** Pin: WIFI ON */ +#define CYBSP_WIFI_WL_REG_ON (P2_6) +/** Pin: WIFI Host Wakeup */ +#define CYBSP_WIFI_HOST_WAKE (P4_1) + +/** Pin: BT UART RX */ +#define CYBSP_BT_UART_RX (P3_0) +/** Pin: BT UART TX */ +#define CYBSP_BT_UART_TX (P3_1) +/** Pin: BT UART RTS */ +#define CYBSP_BT_UART_RTS (P3_2) +/** Pin: BT UART CTS */ +#define CYBSP_BT_UART_CTS (P3_3) + +/** Pin: BT Power */ +#define CYBSP_BT_POWER (P3_4) +/** Pin: BT Host Wakeup */ +#define CYBSP_BT_HOST_WAKE (P4_0) +/** Pin: BT Device Wakeup */ +#define CYBSP_BT_DEVICE_WAKE (P3_5) + +/** Pin: UART RX */ +#define CYBSP_DEBUG_UART_RX (P5_0) +/** Pin: UART TX */ +#define CYBSP_DEBUG_UART_TX (P5_1) + +/** Pin: I2C SCL */ +#define CYBSP_I2C_SCL (P6_0) +/** Pin: I2C SDA */ +#define CYBSP_I2C_SDA (P6_1) + +/** Pin: SWO */ +#define CYBSP_SWO (P6_4) +/** Pin: SWDIO */ +#define CYBSP_SWDIO (P6_6) +/** Pin: SWDCK */ +#define CYBSP_SWDCK (P6_7) + +/** Pin: QUAD SPI SS */ +#define CYBSP_QSPI_SS (P11_2) +/** Pin: QUAD SPI D3 */ +#define CYBSP_QSPI_D3 (P11_3) +/** Pin: QUAD SPI D2 */ +#define CYBSP_QSPI_D2 (P11_4) +/** Pin: QUAD SPI D1 */ +#define CYBSP_QSPI_D1 (P11_5) +/** Pin: QUAD SPI D0 */ +#define CYBSP_QSPI_D0 (P11_6) +/** Pin: QUAD SPI SCK */ +#define CYBSP_QSPI_SCK (P11_7) + +/** Pin: SPI MOSI */ +#define CYBSP_SPI_MOSI (P12_0) +/** Pin: SPI MISO */ +#define CYBSP_SPI_MISO (P12_1) +/** Pin: SPI CLK */ +#define CYBSP_SPI_CLK (P12_2) +/** Pin: SPI CS */ +#define CYBSP_SPI_CS (P12_4) + +/** Host-wake GPIO drive mode */ +#define CYBSP_WIFI_HOST_WAKE_GPIO_DM (CYHAL_GPIO_DRIVE_ANALOG) +/** Host-wake IRQ event */ +#define CYBSP_WIFI_HOST_WAKE_IRQ_EVENT (CYHAL_GPIO_IRQ_RISE) + +/** \} group_bsp_pins_comm */ + + +/** +* \addtogroup group_bsp_pins_arduino Arduino Header Pins +* \{ +*/ + +/** Arduino A0 */ +#define CYBSP_A0 P10_0 +/** Arduino A1 */ +#define CYBSP_A1 P10_1 +/** Arduino A2 */ +#define CYBSP_A2 P10_2 +/** Arduino A3 */ +#define CYBSP_A3 P10_3 +/** Arduino A4 */ +#define CYBSP_A4 P10_4 +/** Arduino A5 */ +#define CYBSP_A5 P10_5 +/** Arduino D0 */ +#define CYBSP_D0 (P5_0) +/** Arduino D1 */ +#define CYBSP_D1 (P5_1) +/** Arduino D2 */ +#define CYBSP_D2 (P5_2) +/** Arduino D3 */ +#define CYBSP_D3 (P5_3) +/** Arduino D4 */ +#define CYBSP_D4 (P5_4) +/** Arduino D5 */ +#define CYBSP_D5 (P5_5) +/** Arduino D6 */ +#define CYBSP_D6 (P5_6) +/** Arduino D7 */ +#define CYBSP_D7 (P5_7) +/** Arduino D8 */ +#define CYBSP_D8 (P7_5) +/** Arduino D9 */ +#define CYBSP_D9 (P7_4) +/** Arduino D10 */ +#define CYBSP_D10 (P12_3) +/** Arduino D11 */ +#define CYBSP_D11 (P12_0) +/** Arduino D12 */ +#define CYBSP_D12 (P12_1) +/** Arduino D13 */ +#define CYBSP_D13 (P12_2) +/** Arduino D14 */ +#define CYBSP_D14 (P6_1) +/** Arduino D15 */ +#define CYBSP_D15 (P6_0) + +/** \} group_bsp_pins_arduino */ + + +/** +* \addtogroup group_bsp_pins_j2 J2 Header Pins +* \{ +*/ + +/** Cypress J2 Header pin 1 */ +#define CYBSP_J2_1 (CYBSP_A0) +/** Cypress J2 Header pin 2 */ +#define CYBSP_J2_2 (P9_0) +/** Cypress J2 Header pin 3 */ +#define CYBSP_J2_3 (CYBSP_A1) +/** Cypress J2 Header pin 4 */ +#define CYBSP_J2_4 (P9_1) +/** Cypress J2 Header pin 5 */ +#define CYBSP_J2_5 (CYBSP_A2) +/** Cypress J2 Header pin 6 */ +#define CYBSP_J2_6 (P9_2) +/** Cypress J2 Header pin 7 */ +#define CYBSP_J2_7 (CYBSP_A3) +/** Cypress J2 Header pin 8 */ +#define CYBSP_J2_8 (P9_3) +/** Cypress J2 Header pin 9 */ +#define CYBSP_J2_9 (CYBSP_A4) +/** Cypress J2 Header pin 10 */ +#define CYBSP_J2_10 (P9_4) +/** Cypress J2 Header pin 11 */ +#define CYBSP_J2_11 (CYBSP_A5) +/** Cypress J2 Header pin 12 */ +#define CYBSP_J2_12 (P9_5) +/** Cypress J2 Header pin 13 */ +#define CYBSP_J2_13 (P10_6) +/** Cypress J2 Header pin 14 */ +#define CYBSP_J2_14 (P9_6) +/** Cypress J2 Header pin 15 */ +#define CYBSP_J2_15 (NC) +/** Cypress J2 Header pin 16 */ +#define CYBSP_J2_16 (NC) + +/** \} group_bsp_pins_j2 */ + +/** \} group_bsp_pins */ + +#endif /* defined(CY_USING_HAL) */ + +#if defined(__cplusplus) +} +#endif diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM0P/TOOLCHAIN_ARM/cy8c6xx7_cm0plus.sct b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM0P/TOOLCHAIN_ARM/cy8c6xx7_cm0plus.sct new file mode 100644 index 00000000000..ff0e80b8408 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM0P/TOOLCHAIN_ARM/cy8c6xx7_cm0plus.sct @@ -0,0 +1,312 @@ +#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m0 +; The first line specifies a preprocessor command that the linker invokes +; to pass a scatter file through a C preprocessor. + +;******************************************************************************* +;* \file cy8c6xx7_cm0plus.sct +;* \version 2.60 +;* +;* Linker file for the ARMCC. +;* +;* The main purpose of the linker script is to describe how the sections in the +;* input files should be mapped into the output file, and to control the memory +;* layout of the output file. +;* +;* \note The entry point location is fixed and starts at 0x10000000. The valid +;* application image should be placed there. +;* +;* \note The linker files included with the PDL template projects must be +;* generic and handle all common use cases. Your project may not use every +;* section defined in the linker files. In that case you may see the warnings +;* during the build process: L6314W (no section matches pattern) and/or L6329W +;* (pattern only matches removed unused sections). In your project, you can +;* suppress the warning by passing the "--diag_suppress=L6314W,L6329W" option to +;* the linker, simply comment out or remove the relevant code in the linker +;* file. +;* +;******************************************************************************* +;* \copyright +;* Copyright 2016-2019 Cypress Semiconductor Corporation +;* SPDX-License-Identifier: Apache-2.0 +;* +;* Licensed under the Apache License, Version 2.0 (the "License"); +;* you may not use this file except in compliance with the License. +;* You may obtain a copy of the License at +;* +;* http://www.apache.org/licenses/LICENSE-2.0 +;* +;* Unless required by applicable law or agreed to in writing, software +;* distributed under the License is distributed on an "AS IS" BASIS, +;* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +;* See the License for the specific language governing permissions and +;* limitations under the License. +;******************************************************************************/ + +#if !defined(MBED_ROM_START) + #define MBED_ROM_START 0x10000000 +#endif + +;* MBED_APP_START is being used by the bootloader build script and +;* will be calculate by the system. Without bootloader the MBED_APP_START +;* is equal to MBED_ROM_START +;* +#if !defined(MBED_APP_START) + #define MBED_APP_START MBED_ROM_START +#endif + +#if !defined(MBED_ROM_SIZE) + #define MBED_ROM_SIZE 0x80000 +#endif + +;* MBED_APP_SIZE is being used by the bootloader build script and +;* will be calculate by the system. Without bootloader the MBED_APP_SIZE +;* is equal to MBED_ROM_SIZE +;* +#if !defined(MBED_APP_SIZE) + #define MBED_APP_SIZE MBED_ROM_SIZE +#endif + +#if !defined(MBED_RAM_START) + #define MBED_RAM_START 0x08000000 +#endif + +#if !defined(MBED_RAM_SIZE) + #define MBED_RAM_SIZE 0x00010000 +#endif + +#if !defined(MBED_PUBLIC_RAM_SIZE) + #define MBED_PUBLIC_RAM_SIZE 0x200 +#endif + +; Size of the stack section at the end of CM0+ SRAM +#if !defined(MBED_BOOT_STACK_SIZE) + #define MBED_BOOT_STACK_SIZE 0x400 +#endif + +#define STACK_SIZE MBED_BOOT_STACK_SIZE + +#if !defined(MBED_PUBLIC_RAM_START) + #define MBED_PUBLIC_RAM_START (MBED_RAM_START + MBED_RAM_SIZE - STACK_SIZE - MBED_PUBLIC_RAM_SIZE) +#endif + +; The defines below describe the location and size of blocks of memory in the target. +; Use these defines to specify the memory regions available for allocation. + +; The following defines control RAM and flash memory allocation for the CM0+ core. +; You can change the memory allocation by editing the RAM and Flash defines. +; Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use. +; Using this memory region for other purposes will lead to unexpected behavior. +; Your changes must be aligned with the corresponding defines for the CM4 core in 'xx_cm4_dual.scat', +; where 'xx' is the device group; for example, 'cy8c6xx7_cm4_dual.scat'. +; RAM +#define RAM_START MBED_RAM_START +#define RAM_SIZE MBED_RAM_SIZE +; Public RAM +#define PUBLIC_RAM_START MBED_PUBLIC_RAM_START +#define PUBLIC_RAM_SIZE MBED_PUBLIC_RAM_SIZE +; Flash +#define FLASH_START MBED_APP_START +#define FLASH_SIZE MBED_APP_SIZE + +; The following defines describe a 32K flash region used for EEPROM emulation. +; This region can also be used as the general purpose flash. +; You can assign sections to this memory region for only one of the cores. +; Note some middleware (e.g. BLE, Emulated EEPROM) can place their data into this memory region. +; Therefore, repurposing this memory region will prevent such middleware from operation. +#define EM_EEPROM_START 0x14000000 +#define EM_EEPROM_SIZE 0x8000 + +; The following defines describe device specific memory regions and must not be changed. +; Supervisory flash: User data +#define SFLASH_USER_DATA_START 0x16000800 +#define SFLASH_USER_DATA_SIZE 0x00000800 + +; Supervisory flash: Normal Access Restrictions (NAR) +#define SFLASH_NAR_START 0x16001A00 +#define SFLASH_NAR_SIZE 0x00000200 + +; Supervisory flash: Public Key +#define SFLASH_PUBLIC_KEY_START 0x16005A00 +#define SFLASH_PUBLIC_KEY_SIZE 0x00000C00 + +; Supervisory flash: Table of Content # 2 +#define SFLASH_TOC_2_START 0x16007C00 +#define SFLASH_TOC_2_SIZE 0x00000200 + +; Supervisory flash: Table of Content # 2 Copy +#define SFLASH_RTOC_2_START 0x16007E00 +#define SFLASH_RTOC_2_SIZE 0x00000200 + +; External memory +#define XIP_START 0x18000000 +#define XIP_SIZE 0x08000000 + +; eFuse +#define EFUSE_START 0x90700000 +#define EFUSE_SIZE 0x100000 + + +; Cortex-M0+ application flash area +LR_IROM1 FLASH_START (FLASH_SIZE - 0x8000) +{ + .cy_app_header +0 + { + * (.cy_app_header) + } + + ER_FLASH_VECTORS +0 + { + * (RESET, +FIRST) + } + + ER_FLASH_CODE +0 FIXED + { + * (InRoot$$Sections) + * (+RO) + } + + ER_RAM_VECTORS RAM_START UNINIT + { + * (RESET_RAM, +FIRST) + } + + RW_RAM_DATA +0 + { + * (.cy_ramfunc) + * (+RW, +ZI) + } + + ; Place variables in the section that should not be initialized during the + ; device startup. + RW_IRAM1 +0 UNINIT + { + * (.noinit) + } + + RW_IRAM2 PUBLIC_RAM_START UNINIT + { + * (.cy_sharedmem) + } + + ; Application heap area (HEAP) + ARM_LIB_HEAP +0 + { + * (HEAP) + } + + ; Stack region growing down + ARM_LIB_STACK RAM_START+RAM_SIZE -STACK_SIZE + { + * (STACK) + } +} + +; Emulated EEPROM Flash area +LR_EM_EEPROM EM_EEPROM_START EM_EEPROM_SIZE +{ + .cy_em_eeprom +0 + { + * (.cy_em_eeprom) + } +} + +; Supervisory flash: User data +LR_SFLASH_USER_DATA SFLASH_USER_DATA_START SFLASH_USER_DATA_SIZE +{ + .cy_sflash_user_data +0 + { + * (.cy_sflash_user_data) + } +} + +; Supervisory flash: Normal Access Restrictions (NAR) +LR_SFLASH_NAR SFLASH_NAR_START SFLASH_NAR_SIZE +{ + .cy_sflash_nar +0 + { + * (.cy_sflash_nar) + } +} + +; Supervisory flash: Public Key +LR_SFLASH_PUBLIC_KEY SFLASH_PUBLIC_KEY_START SFLASH_PUBLIC_KEY_SIZE +{ + .cy_sflash_public_key +0 + { + * (.cy_sflash_public_key) + } +} + +; Supervisory flash: Table of Content # 2 +LR_SFLASH_TOC_2 SFLASH_TOC_2_START SFLASH_TOC_2_SIZE +{ + .cy_toc_part2 +0 + { + * (.cy_toc_part2) + } +} + +; Supervisory flash: Table of Content # 2 Copy +LR_SFLASH_RTOC_2 SFLASH_RTOC_2_START SFLASH_RTOC_2_SIZE +{ + .cy_rtoc_part2 +0 + { + * (.cy_rtoc_part2) + } +} + + +; Places the code in the Execute in Place (XIP) section. See the smif driver documentation for details. +LR_EROM XIP_START XIP_SIZE +{ + .cy_xip +0 + { + * (.cy_xip) + } +} + + +; eFuse +LR_EFUSE EFUSE_START EFUSE_SIZE +{ + .cy_efuse +0 + { + * (.cy_efuse) + } +} + + +; The section is used for additional metadata (silicon revision, Silicon/JTAG ID, etc.) storage. +CYMETA 0x90500000 +{ + .cymeta +0 { * (.cymeta) } +} + +/* The following symbols used by the cymcuelftool. */ +/* Flash */ +#define __cy_memory_0_start 0x10000000 +#define __cy_memory_0_length 0x00100000 +#define __cy_memory_0_row_size 0x200 + +/* Emulated EEPROM Flash area */ +#define __cy_memory_1_start 0x14000000 +#define __cy_memory_1_length 0x8000 +#define __cy_memory_1_row_size 0x200 + +/* Supervisory Flash */ +#define __cy_memory_2_start 0x16000000 +#define __cy_memory_2_length 0x8000 +#define __cy_memory_2_row_size 0x200 + +/* XIP */ +#define __cy_memory_3_start 0x18000000 +#define __cy_memory_3_length 0x08000000 +#define __cy_memory_3_row_size 0x200 + +/* eFuse */ +#define __cy_memory_4_start 0x90700000 +#define __cy_memory_4_length 0x100000 +#define __cy_memory_4_row_size 1 + + +/* [] END OF FILE */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM0P/TOOLCHAIN_ARM/startup_psoc6_01_cm0plus.S b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM0P/TOOLCHAIN_ARM/startup_psoc6_01_cm0plus.S new file mode 100644 index 00000000000..536d029f52a --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM0P/TOOLCHAIN_ARM/startup_psoc6_01_cm0plus.S @@ -0,0 +1,307 @@ +;/**************************************************************************//** +; * @file startup_psoc6_01_cm0plus.S +; * @brief CMSIS Core Device Startup File for +; * ARMCM0plus Device Series +; * @version V5.00 +; * @date 02. March 2016 +; ******************************************************************************/ +;/* +; * Copyright (c) 2009-2016 ARM Limited. All rights reserved. +; * +; * SPDX-License-Identifier: Apache-2.0 +; * +; * Licensed under the Apache License, Version 2.0 (the License); you may +; * not use this file except in compliance with the License. +; * You may obtain a copy of the License at +; * +; * www.apache.org/licenses/LICENSE-2.0 +; * +; * Unless required by applicable law or agreed to in writing, software +; * distributed under the License is distributed on an AS IS BASIS, WITHOUT +; * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +; * See the License for the specific language governing permissions and +; * limitations under the License. +; */ + +;/* +;//-------- <<< Use Configuration Wizard in Context Menu >>> ------------------ +;*/ + +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + IF :DEF:__STACK_SIZE +Stack_Size EQU __STACK_SIZE + ELSE +Stack_Size EQU 0x00000400 + ENDIF + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + IF :DEF:__HEAP_SIZE +Heap_Size EQU __HEAP_SIZE + ELSE +Heap_Size EQU 0x00000400 + ENDIF + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + + PRESERVE8 + THUMB + +; Vector Table Mapped to Address 0 at Reset + + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + + DCD 0x0000000D ; NMI Handler located at ROM code + DCD HardFault_Handler ; Hard Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External interrupts Description + DCD NvicMux0_IRQHandler ; CM0+ NVIC Mux input 0 + DCD NvicMux1_IRQHandler ; CM0+ NVIC Mux input 1 + DCD NvicMux2_IRQHandler ; CM0+ NVIC Mux input 2 + DCD NvicMux3_IRQHandler ; CM0+ NVIC Mux input 3 + DCD NvicMux4_IRQHandler ; CM0+ NVIC Mux input 4 + DCD NvicMux5_IRQHandler ; CM0+ NVIC Mux input 5 + DCD NvicMux6_IRQHandler ; CM0+ NVIC Mux input 6 + DCD NvicMux7_IRQHandler ; CM0+ NVIC Mux input 7 + DCD NvicMux8_IRQHandler ; CM0+ NVIC Mux input 8 + DCD NvicMux9_IRQHandler ; CM0+ NVIC Mux input 9 + DCD NvicMux10_IRQHandler ; CM0+ NVIC Mux input 10 + DCD NvicMux11_IRQHandler ; CM0+ NVIC Mux input 11 + DCD NvicMux12_IRQHandler ; CM0+ NVIC Mux input 12 + DCD NvicMux13_IRQHandler ; CM0+ NVIC Mux input 13 + DCD NvicMux14_IRQHandler ; CM0+ NVIC Mux input 14 + DCD NvicMux15_IRQHandler ; CM0+ NVIC Mux input 15 + DCD NvicMux16_IRQHandler ; CM0+ NVIC Mux input 16 + DCD NvicMux17_IRQHandler ; CM0+ NVIC Mux input 17 + DCD NvicMux18_IRQHandler ; CM0+ NVIC Mux input 18 + DCD NvicMux19_IRQHandler ; CM0+ NVIC Mux input 19 + DCD NvicMux20_IRQHandler ; CM0+ NVIC Mux input 20 + DCD NvicMux21_IRQHandler ; CM0+ NVIC Mux input 21 + DCD NvicMux22_IRQHandler ; CM0+ NVIC Mux input 22 + DCD NvicMux23_IRQHandler ; CM0+ NVIC Mux input 23 + DCD NvicMux24_IRQHandler ; CM0+ NVIC Mux input 24 + DCD NvicMux25_IRQHandler ; CM0+ NVIC Mux input 25 + DCD NvicMux26_IRQHandler ; CM0+ NVIC Mux input 26 + DCD NvicMux27_IRQHandler ; CM0+ NVIC Mux input 27 + DCD NvicMux28_IRQHandler ; CM0+ NVIC Mux input 28 + DCD NvicMux29_IRQHandler ; CM0+ NVIC Mux input 29 + DCD NvicMux30_IRQHandler ; CM0+ NVIC Mux input 30 + DCD NvicMux31_IRQHandler ; CM0+ NVIC Mux input 31 + +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + EXPORT __ramVectors + AREA RESET_RAM, READWRITE, NOINIT +__ramVectors SPACE __Vectors_Size + + + AREA |.text|, CODE, READONLY + + +; Weak function for startup customization +; +; Note. The global resources are not yet initialized (for example global variables, peripherals, clocks) +; because this function is executed as the first instruction in the ResetHandler. +; The PDL is also not initialized to use the proper register offsets. +; The user of this function is responsible for initializing the PDL and resources before using them. +; +Cy_OnResetUser PROC + EXPORT Cy_OnResetUser [WEAK] + BX LR + ENDP + +; Reset Handler +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT __main + + ; Define strong function for startup customization + BL Cy_OnResetUser + + ; Copy vectors from ROM to RAM + LDR r1, =__Vectors + LDR r0, =__ramVectors + LDR r2, =__Vectors_Size +Vectors_Copy + LDR r3, [r1] + STR r3, [r0] + ADDS r0, r0, #4 + ADDS r1, r1, #4 + SUBS r2, r2, #1 + CMP r2, #0 + BNE Vectors_Copy + + ; Update Vector Table Offset Register. */ + LDR r0, =__ramVectors + LDR r1, =0xE000ED08 + STR r0, [r1] + dsb 0xF + + LDR R0, =__main + BLX R0 + + ; Should never get here + B . + + ENDP + +; Dummy Exception Handlers (infinite loops which can be modified) +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP + +Cy_SysLib_FaultHandler PROC + EXPORT Cy_SysLib_FaultHandler [WEAK] + B . + ENDP + +HardFault_Handler PROC + EXPORT HardFault_Handler [WEAK] + movs r0, #4 + mov r1, LR + tst r0, r1 + beq L_MSP + mrs r0, PSP + bl L_API_call +L_MSP + mrs r0, MSP +L_API_call + bl Cy_SysLib_FaultHandler + ENDP + +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + EXPORT Default_Handler [WEAK] + EXPORT NvicMux0_IRQHandler [WEAK] + EXPORT NvicMux1_IRQHandler [WEAK] + EXPORT NvicMux2_IRQHandler [WEAK] + EXPORT NvicMux3_IRQHandler [WEAK] + EXPORT NvicMux4_IRQHandler [WEAK] + EXPORT NvicMux5_IRQHandler [WEAK] + EXPORT NvicMux6_IRQHandler [WEAK] + EXPORT NvicMux7_IRQHandler [WEAK] + EXPORT NvicMux8_IRQHandler [WEAK] + EXPORT NvicMux9_IRQHandler [WEAK] + EXPORT NvicMux10_IRQHandler [WEAK] + EXPORT NvicMux11_IRQHandler [WEAK] + EXPORT NvicMux12_IRQHandler [WEAK] + EXPORT NvicMux13_IRQHandler [WEAK] + EXPORT NvicMux14_IRQHandler [WEAK] + EXPORT NvicMux15_IRQHandler [WEAK] + EXPORT NvicMux16_IRQHandler [WEAK] + EXPORT NvicMux17_IRQHandler [WEAK] + EXPORT NvicMux18_IRQHandler [WEAK] + EXPORT NvicMux19_IRQHandler [WEAK] + EXPORT NvicMux20_IRQHandler [WEAK] + EXPORT NvicMux21_IRQHandler [WEAK] + EXPORT NvicMux22_IRQHandler [WEAK] + EXPORT NvicMux23_IRQHandler [WEAK] + EXPORT NvicMux24_IRQHandler [WEAK] + EXPORT NvicMux25_IRQHandler [WEAK] + EXPORT NvicMux26_IRQHandler [WEAK] + EXPORT NvicMux27_IRQHandler [WEAK] + EXPORT NvicMux28_IRQHandler [WEAK] + EXPORT NvicMux29_IRQHandler [WEAK] + EXPORT NvicMux30_IRQHandler [WEAK] + EXPORT NvicMux31_IRQHandler [WEAK] + +NvicMux0_IRQHandler +NvicMux1_IRQHandler +NvicMux2_IRQHandler +NvicMux3_IRQHandler +NvicMux4_IRQHandler +NvicMux5_IRQHandler +NvicMux6_IRQHandler +NvicMux7_IRQHandler +NvicMux8_IRQHandler +NvicMux9_IRQHandler +NvicMux10_IRQHandler +NvicMux11_IRQHandler +NvicMux12_IRQHandler +NvicMux13_IRQHandler +NvicMux14_IRQHandler +NvicMux15_IRQHandler +NvicMux16_IRQHandler +NvicMux17_IRQHandler +NvicMux18_IRQHandler +NvicMux19_IRQHandler +NvicMux20_IRQHandler +NvicMux21_IRQHandler +NvicMux22_IRQHandler +NvicMux23_IRQHandler +NvicMux24_IRQHandler +NvicMux25_IRQHandler +NvicMux26_IRQHandler +NvicMux27_IRQHandler +NvicMux28_IRQHandler +NvicMux29_IRQHandler +NvicMux30_IRQHandler +NvicMux31_IRQHandler + + B . + ENDP + + ALIGN + + +; User Initial Stack & Heap + + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + + ALIGN + + ENDIF + + END + + +; [] END OF FILE diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM0P/TOOLCHAIN_GCC_ARM/cy8c6xx7_cm0plus.ld b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM0P/TOOLCHAIN_GCC_ARM/cy8c6xx7_cm0plus.ld new file mode 100644 index 00000000000..b8339aa0eaa --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM0P/TOOLCHAIN_GCC_ARM/cy8c6xx7_cm0plus.ld @@ -0,0 +1,470 @@ +/***************************************************************************//** +* \file cy8c6xx7_cm0plus.ld +* \version 2.50 +* +* Linker file for the GNU C compiler. +* +* The main purpose of the linker script is to describe how the sections in the +* input files should be mapped into the output file, and to control the memory +* layout of the output file. +* +* \note The entry point location is fixed and starts at 0x10000000. The valid +* application image should be placed there. +* +* \note The linker files included with the PDL template projects must be generic +* and handle all common use cases. Your project may not use every section +* defined in the linker files. In that case you may see warnings during the +* build process. In your project, you can simply comment out or remove the +* relevant code in the linker file. +* +******************************************************************************** +* \copyright +* Copyright 2016-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*******************************************************************************/ + +OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") +SEARCH_DIR(.) +GROUP(-lgcc -lc -lnosys) +ENTRY(Reset_Handler) + +#if !defined(MBED_ROM_START) + #define MBED_ROM_START 0x10000000 +#endif + +/* MBED_APP_START is being used by the bootloader build script and +* will be calculate by the system. Without bootloader the MBED_APP_START +* is equal to MBED_ROM_START +*/ +#if !defined(MBED_APP_START) + #define MBED_APP_START MBED_ROM_START +#endif + +#if !defined(MBED_ROM_SIZE) + #define MBED_ROM_SIZE 0x80000 +#endif + +/* MBED_APP_SIZE is being used by the bootloader build script and +* will be calculate by the system. Without bootloader the MBED_APP_SIZE +* is equal to MBED_ROM_SIZE +*/ +#if !defined(MBED_APP_SIZE) + #define MBED_APP_SIZE MBED_ROM_SIZE +#endif + +#if !defined(MBED_RAM_START) + #define MBED_RAM_START 0x08000000 +#endif + +#if !defined(MBED_RAM_SIZE) + #define MBED_RAM_SIZE 0x00010000 +#endif + +#if !defined(MBED_PUBLIC_RAM_SIZE) + #define MBED_PUBLIC_RAM_SIZE 0x200 +#endif + +/* Size of the stack section at the end of CM0+ SRAM */ +#if !defined(MBED_BOOT_STACK_SIZE) + #define MBED_BOOT_STACK_SIZE 0x400 +#endif + +STACK_SIZE = MBED_BOOT_STACK_SIZE; + +#if !defined(MBED_PUBLIC_RAM_START) + #define MBED_PUBLIC_RAM_START (MBED_RAM_START + MBED_RAM_SIZE - STACK_SIZE - MBED_PUBLIC_RAM_SIZE) +#endif + +/* Force symbol to be entered in the output file as an undefined symbol. Doing +* this may, for example, trigger linking of additional modules from standard +* libraries. You may list several symbols for each EXTERN, and you may use +* EXTERN multiple times. This command has the same effect as the -u command-line +* option. +*/ +EXTERN(Reset_Handler) + +/* The MEMORY section below describes the location and size of blocks of memory in the target. +* Use this section to specify the memory regions available for allocation. +*/ +MEMORY +{ + /* The ram and flash regions control RAM and flash memory allocation for the CM0+ core. + * You can change the memory allocation by editing the 'ram' and 'flash' regions. + * Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use. + * Using this memory region for other purposes will lead to unexpected behavior. + * Your changes must be aligned with the corresponding memory regions for the CM4 core in 'xx_cm4_dual.ld', + * where 'xx' is the device group; for example, 'cy8c6xx7_cm4_dual.ld'. + */ + ram (rwx) : ORIGIN = MBED_RAM_START, LENGTH = MBED_RAM_SIZE + public_ram (rw) : ORIGIN = MBED_PUBLIC_RAM_START, LENGTH = MBED_PUBLIC_RAM_SIZE + flash (rx) : ORIGIN = MBED_APP_START, LENGTH = (MBED_APP_SIZE - 0x8000) + + /* This is a 32K flash region used for EEPROM emulation. This region can also be used as the general purpose flash. + * You can assign sections to this memory region for only one of the cores. + * Note some middleware (e.g. BLE, Emulated EEPROM) can place their data into this memory region. + * Therefore, repurposing this memory region will prevent such middleware from operation. + */ + em_eeprom (rx) : ORIGIN = 0x14000000, LENGTH = 0x8000 /* 32 KB */ + + /* The following regions define device specific memory regions and must not be changed. */ + sflash_user_data (rx) : ORIGIN = 0x16000800, LENGTH = 0x800 /* Supervisory flash: User data */ + sflash_nar (rx) : ORIGIN = 0x16001A00, LENGTH = 0x200 /* Supervisory flash: Normal Access Restrictions (NAR) */ + sflash_public_key (rx) : ORIGIN = 0x16005A00, LENGTH = 0xC00 /* Supervisory flash: Public Key */ + sflash_toc_2 (rx) : ORIGIN = 0x16007C00, LENGTH = 0x200 /* Supervisory flash: Table of Content # 2 */ + sflash_rtoc_2 (rx) : ORIGIN = 0x16007E00, LENGTH = 0x200 /* Supervisory flash: Table of Content # 2 Copy */ + xip (rx) : ORIGIN = 0x18000000, LENGTH = 0x8000000 /* 128 MB */ + efuse (r) : ORIGIN = 0x90700000, LENGTH = 0x100000 /* 1 MB */ +} + +/* Library configurations */ +GROUP(libgcc.a libc.a libm.a libnosys.a) + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + * __Vectors_End + * __Vectors_Size + */ + + +SECTIONS +{ + .cy_app_header : + { + KEEP(*(.cy_app_header)) + } > flash + + /* Cortex-M0+ application flash area */ + .text : + { + . = ALIGN(4); + __Vectors = . ; + KEEP(*(.vectors)) + . = ALIGN(4); + __Vectors_End = .; + __Vectors_Size = __Vectors_End - __Vectors; + __end__ = .; + + . = ALIGN(4); + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + /* Read-only code (constants). */ + *(.rodata .rodata.* .constdata .constdata.* .conststring .conststring.*) + + KEEP(*(.eh_frame*)) + } > flash + + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > flash + + __exidx_start = .; + + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > flash + __exidx_end = .; + + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_psoc6_01_cm0plus.S */ + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + + /* Copy interrupt vectors from flash to RAM */ + LONG (__Vectors) /* From */ + LONG (__ram_vectors_start__) /* To */ + LONG (__Vectors_End - __Vectors) /* Size */ + + /* Copy data section to RAM */ + LONG (__etext) /* From */ + LONG (__data_start__) /* To */ + LONG (__data_end__ - __data_start__) /* Size */ + + __copy_table_end__ = .; + } > flash + + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_psoc6_01_cm0plus.S */ + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + __zero_table_end__ = .; + } > flash + + __etext = . ; + + + .ramVectors (NOLOAD) : ALIGN(8) + { + __ram_vectors_start__ = .; + KEEP(*(.ram_vectors)) + __ram_vectors_end__ = .; + } > ram + + + .data __ram_vectors_end__ : AT (__etext) + { + __data_start__ = .; + + *(vtable) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(4); + + KEEP(*(.cy_ramfunc*)) + . = ALIGN(4); + + __data_end__ = .; + + } > ram + + + /* Place variables in the section that should not be initialized during the + * device startup. + */ + .noinit (NOLOAD) : ALIGN(8) + { + KEEP(*(.noinit)) + } > ram + + + /* The uninitialized global or static variables are placed in this section. + * + * The NOLOAD attribute tells linker that .bss section does not consume + * any space in the image. The NOLOAD attribute changes the .bss type to + * NOBITS, and that makes linker to A) not allocate section in memory, and + * A) put information to clear the section with all zeros during application + * loading. + * + * Without the NOLOAD attribute, the .bss section might get PROGBITS type. + * This makes linker to A) allocate zeroed section in memory, and B) copy + * this section to RAM during application loading. + */ + .bss (NOLOAD): + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > ram + + + .heap (NOLOAD): + { + __HeapBase = .; + __end__ = .; + end = __end__; + KEEP(*(.heap*)) + . = ORIGIN(ram) + LENGTH(ram) - STACK_SIZE; + __HeapLimit = .; + } > ram + + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (NOLOAD): + { + KEEP(*(.stack*)) + } > ram + + + /* Public RAM */ + .cy_sharedmem (NOLOAD): + { + . = ALIGN(4); + KEEP(*(.cy_sharedmem)) + } > public_ram + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(ram) + LENGTH(ram); + __StackLimit = __StackTop - STACK_SIZE; + PROVIDE(__stack = __StackTop); + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") + + + /* Emulated EEPROM Flash area */ + .cy_em_eeprom : + { + KEEP(*(.cy_em_eeprom)) + } > em_eeprom + + + /* Supervisory Flash: User data */ + .cy_sflash_user_data : + { + KEEP(*(.cy_sflash_user_data)) + } > sflash_user_data + + + /* Supervisory Flash: Normal Access Restrictions (NAR) */ + .cy_sflash_nar : + { + KEEP(*(.cy_sflash_nar)) + } > sflash_nar + + + /* Supervisory Flash: Public Key */ + .cy_sflash_public_key : + { + KEEP(*(.cy_sflash_public_key)) + } > sflash_public_key + + + /* Supervisory Flash: Table of Content # 2 */ + .cy_toc_part2 : + { + KEEP(*(.cy_toc_part2)) + } > sflash_toc_2 + + + /* Supervisory Flash: Table of Content # 2 Copy */ + .cy_rtoc_part2 : + { + KEEP(*(.cy_rtoc_part2)) + } > sflash_rtoc_2 + + + /* Places the code in the Execute in Place (XIP) section. See the smif driver + * documentation for details. + */ + .cy_xip : + { + KEEP(*(.cy_xip)) + } > xip + + + /* eFuse */ + .cy_efuse : + { + KEEP(*(.cy_efuse)) + } > efuse + + + /* These sections are used for additional metadata (silicon revision, + * Silicon/JTAG ID, etc.) storage. + */ + .cymeta 0x90500000 : { KEEP(*(.cymeta)) } :NONE +} + + +/* The following symbols used by the cymcuelftool. */ +/* Flash */ +__cy_memory_0_start = 0x10000000; +__cy_memory_0_length = 0x00100000; +__cy_memory_0_row_size = 0x200; + +/* Emulated EEPROM Flash area */ +__cy_memory_1_start = 0x14000000; +__cy_memory_1_length = 0x8000; +__cy_memory_1_row_size = 0x200; + +/* Supervisory Flash */ +__cy_memory_2_start = 0x16000000; +__cy_memory_2_length = 0x8000; +__cy_memory_2_row_size = 0x200; + +/* XIP */ +__cy_memory_3_start = 0x18000000; +__cy_memory_3_length = 0x08000000; +__cy_memory_3_row_size = 0x200; + +/* eFuse */ +__cy_memory_4_start = 0x90700000; +__cy_memory_4_length = 0x100000; +__cy_memory_4_row_size = 1; + +/* EOF */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM0P/TOOLCHAIN_GCC_ARM/startup_psoc6_01_cm0plus.S b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM0P/TOOLCHAIN_GCC_ARM/startup_psoc6_01_cm0plus.S new file mode 100644 index 00000000000..b46556a8a7a --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM0P/TOOLCHAIN_GCC_ARM/startup_psoc6_01_cm0plus.S @@ -0,0 +1,399 @@ +/**************************************************************************//** + * @file startup_psoc6_01_cm0plus.S + * @brief CMSIS Core Device Startup File for + * ARMCM0plus Device Series + * @version V5.00 + * @date 02. March 2016 + ******************************************************************************/ +/* + * Copyright (c) 2009-2016 ARM Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + /* Address of the NMI handler */ + #define CY_NMI_HANLDER_ADDR 0x0000000D + + /* The CPU VTOR register */ + #define CY_CPU_VTOR_ADDR 0xE000ED08 + + /* Copy flash vectors and data section to RAM */ + #define __STARTUP_COPY_MULTIPLE + + /* Clear single BSS section */ + #define __STARTUP_CLEAR_BSS + + .syntax unified + .arch armv6-m + + .section .stack + .align 3 +#ifdef __STACK_SIZE + .equ Stack_Size, __STACK_SIZE +#else + .equ Stack_Size, 0x00001000 +#endif + .globl __StackTop + .globl __StackLimit +__StackLimit: + .space Stack_Size + .size __StackLimit, . - __StackLimit +__StackTop: + .size __StackTop, . - __StackTop + + .section .heap + .align 3 +#ifdef __HEAP_SIZE + .equ Heap_Size, __HEAP_SIZE +#else + .equ Heap_Size, 0x00000400 +#endif + .globl __HeapBase + .globl __HeapLimit +__HeapBase: + .if Heap_Size + .space Heap_Size + .endif + .size __HeapBase, . - __HeapBase +__HeapLimit: + .size __HeapLimit, . - __HeapLimit + + .section .vectors + .align 2 + .globl __Vectors +__Vectors: + .long __StackTop /* Top of Stack */ + .long Reset_Handler /* Reset Handler */ + .long CY_NMI_HANLDER_ADDR /* NMI Handler */ + .long HardFault_Handler /* Hard Fault Handler */ + .long 0 /* Reserved */ + .long 0 /* Reserved */ + .long 0 /* Reserved */ + .long 0 /* Reserved */ + .long 0 /* Reserved */ + .long 0 /* Reserved */ + .long 0 /* Reserved */ + .long SVC_Handler /* SVCall Handler */ + .long 0 /* Reserved */ + .long 0 /* Reserved */ + .long PendSV_Handler /* PendSV Handler */ + .long SysTick_Handler /* SysTick Handler */ + + /* External interrupts Description */ + .long NvicMux0_IRQHandler /* CM0+ NVIC Mux input 0 */ + .long NvicMux1_IRQHandler /* CM0+ NVIC Mux input 1 */ + .long NvicMux2_IRQHandler /* CM0+ NVIC Mux input 2 */ + .long NvicMux3_IRQHandler /* CM0+ NVIC Mux input 3 */ + .long NvicMux4_IRQHandler /* CM0+ NVIC Mux input 4 */ + .long NvicMux5_IRQHandler /* CM0+ NVIC Mux input 5 */ + .long NvicMux6_IRQHandler /* CM0+ NVIC Mux input 6 */ + .long NvicMux7_IRQHandler /* CM0+ NVIC Mux input 7 */ + .long NvicMux8_IRQHandler /* CM0+ NVIC Mux input 8 */ + .long NvicMux9_IRQHandler /* CM0+ NVIC Mux input 9 */ + .long NvicMux10_IRQHandler /* CM0+ NVIC Mux input 10 */ + .long NvicMux11_IRQHandler /* CM0+ NVIC Mux input 11 */ + .long NvicMux12_IRQHandler /* CM0+ NVIC Mux input 12 */ + .long NvicMux13_IRQHandler /* CM0+ NVIC Mux input 13 */ + .long NvicMux14_IRQHandler /* CM0+ NVIC Mux input 14 */ + .long NvicMux15_IRQHandler /* CM0+ NVIC Mux input 15 */ + .long NvicMux16_IRQHandler /* CM0+ NVIC Mux input 16 */ + .long NvicMux17_IRQHandler /* CM0+ NVIC Mux input 17 */ + .long NvicMux18_IRQHandler /* CM0+ NVIC Mux input 18 */ + .long NvicMux19_IRQHandler /* CM0+ NVIC Mux input 19 */ + .long NvicMux20_IRQHandler /* CM0+ NVIC Mux input 20 */ + .long NvicMux21_IRQHandler /* CM0+ NVIC Mux input 21 */ + .long NvicMux22_IRQHandler /* CM0+ NVIC Mux input 22 */ + .long NvicMux23_IRQHandler /* CM0+ NVIC Mux input 23 */ + .long NvicMux24_IRQHandler /* CM0+ NVIC Mux input 24 */ + .long NvicMux25_IRQHandler /* CM0+ NVIC Mux input 25 */ + .long NvicMux26_IRQHandler /* CM0+ NVIC Mux input 26 */ + .long NvicMux27_IRQHandler /* CM0+ NVIC Mux input 27 */ + .long NvicMux28_IRQHandler /* CM0+ NVIC Mux input 28 */ + .long NvicMux29_IRQHandler /* CM0+ NVIC Mux input 29 */ + .long NvicMux30_IRQHandler /* CM0+ NVIC Mux input 30 */ + .long NvicMux31_IRQHandler /* CM0+ NVIC Mux input 31 */ + + .size __Vectors, . - __Vectors + .equ __VectorsSize, . - __Vectors + + .section .ram_vectors + .align 2 + .globl __ramVectors +__ramVectors: + .space __VectorsSize + .size __ramVectors, . - __ramVectors + + + .text + .thumb + .thumb_func + .align 2 + + /* + * Device startup customization + * + * Note. The global resources are not yet initialized (for example global variables, peripherals, clocks) + * because this function is executed as the first instruction in the ResetHandler. + * The PDL is also not initialized to use the proper register offsets. + * The user of this function is responsible for initializing the PDL and resources before using them. + */ + .weak Cy_OnResetUser + .func Cy_OnResetUser, Cy_OnResetUser + .type Cy_OnResetUser, %function + +Cy_OnResetUser: + bx lr + .size Cy_OnResetUser, . - Cy_OnResetUser + .endfunc + + /* Reset handler */ + .weak Reset_Handler + .type Reset_Handler, %function + +Reset_Handler: + bl Cy_OnResetUser + +/* Firstly it copies data from read only memory to RAM. There are two schemes + * to copy. One can copy more than one sections. Another can only copy + * one section. The former scheme needs more instructions and read-only + * data to implement than the latter. + * Macro __STARTUP_COPY_MULTIPLE is used to choose between two schemes. */ + +#ifdef __STARTUP_COPY_MULTIPLE +/* Multiple sections scheme. + * + * Between symbol address __copy_table_start__ and __copy_table_end__, + * there are array of triplets, each of which specify: + * offset 0: LMA of start of a section to copy from + * offset 4: VMA of start of a section to copy to + * offset 8: size of the section to copy. Must be multiply of 4 + * + * All addresses must be aligned to 4 bytes boundary. + */ + ldr r4, =__copy_table_start__ + ldr r5, =__copy_table_end__ + +.L_loop0: + cmp r4, r5 + bge .L_loop0_done + ldr r1, [r4] + ldr r2, [r4, #4] + ldr r3, [r4, #8] + +.L_loop0_0: + subs r3, #4 + blt .L_loop0_0_done + ldr r0, [r1, r3] + str r0, [r2, r3] + b .L_loop0_0 + +.L_loop0_0_done: + adds r4, #12 + b .L_loop0 + +.L_loop0_done: +#else +/* Single section scheme. + * + * The ranges of copy from/to are specified by following symbols + * __etext: LMA of start of the section to copy from. Usually end of text + * __data_start__: VMA of start of the section to copy to + * __data_end__: VMA of end of the section to copy to + * + * All addresses must be aligned to 4 bytes boundary. + */ + ldr r1, =__etext + ldr r2, =__data_start__ + ldr r3, =__data_end__ + + subs r3, r2 + ble .L_loop1_done + +.L_loop1: + subs r3, #4 + ldr r0, [r1,r3] + str r0, [r2,r3] + bgt .L_loop1 + +.L_loop1_done: +#endif /*__STARTUP_COPY_MULTIPLE */ + +/* This part of work usually is done in C library startup code. Otherwise, + * define this macro to enable it in this startup. + * + * There are two schemes too. One can clear multiple BSS sections. Another + * can only clear one section. The former is more size expensive than the + * latter. + * + * Define macro __STARTUP_CLEAR_BSS_MULTIPLE to choose the former. + * Otherwise define macro __STARTUP_CLEAR_BSS to choose the later. + */ +#ifdef __STARTUP_CLEAR_BSS_MULTIPLE +/* Multiple sections scheme. + * + * Between symbol address __copy_table_start__ and __copy_table_end__, + * there are array of tuples specifying: + * offset 0: Start of a BSS section + * offset 4: Size of this BSS section. Must be multiply of 4 + */ + ldr r3, =__zero_table_start__ + ldr r4, =__zero_table_end__ + +.L_loop2: + cmp r3, r4 + bge .L_loop2_done + ldr r1, [r3] + ldr r2, [r3, #4] + movs r0, 0 + +.L_loop2_0: + subs r2, #4 + blt .L_loop2_0_done + str r0, [r1, r2] + b .L_loop2_0 +.L_loop2_0_done: + + adds r3, #8 + b .L_loop2 +.L_loop2_done: +#elif defined (__STARTUP_CLEAR_BSS) +/* Single BSS section scheme. + * + * The BSS section is specified by following symbols + * __bss_start__: start of the BSS section. + * __bss_end__: end of the BSS section. + * + * Both addresses must be aligned to 4 bytes boundary. + */ + ldr r1, =__bss_start__ + ldr r2, =__bss_end__ + + movs r0, 0 + + subs r2, r1 + ble .L_loop3_done + +.L_loop3: + subs r2, #4 + str r0, [r1, r2] + bgt .L_loop3 +.L_loop3_done: +#endif /* __STARTUP_CLEAR_BSS_MULTIPLE || __STARTUP_CLEAR_BSS */ + + /* Update Vector Table Offset Register. */ + ldr r0, =__ramVectors + ldr r1, =CY_CPU_VTOR_ADDR + str r0, [r1] + dsb 0xF + + bl _start + + /* Should never get here */ + b . + + .pool + .size Reset_Handler, . - Reset_Handler + + .align 1 + .thumb_func + .weak Default_Handler + .type Default_Handler, %function +Default_Handler: + b . + .size Default_Handler, . - Default_Handler + .weak Cy_SysLib_FaultHandler + .type Cy_SysLib_FaultHandler, %function + +Cy_SysLib_FaultHandler: + b . + .size Cy_SysLib_FaultHandler, . - Cy_SysLib_FaultHandler + .type Fault_Handler, %function + +Fault_Handler: + /* Storing LR content for Creator call stack trace */ + push {LR} + movs r0, #4 + mov r1, LR + tst r0, r1 + beq .L_MSP + mrs r0, PSP + b .L_API_call +.L_MSP: + mrs r0, MSP +.L_API_call: + /* Compensation of stack pointer address due to pushing 4 bytes of LR */ + adds r0, r0, #4 + bl Cy_SysLib_FaultHandler + b . + .size Fault_Handler, . - Fault_Handler + +.macro def_fault_Handler fault_handler_name + .weak \fault_handler_name + .set \fault_handler_name, Fault_Handler + .endm + +/* Macro to define default handlers. Default handler + * will be weak symbol and just dead loops. They can be + * overwritten by other handlers */ + .macro def_irq_handler handler_name + .weak \handler_name + .set \handler_name, Default_Handler + .endm + + def_irq_handler NMI_Handler + + def_fault_Handler HardFault_Handler + + def_irq_handler SVC_Handler + def_irq_handler PendSV_Handler + def_irq_handler SysTick_Handler + + def_irq_handler NvicMux0_IRQHandler /* CM0+ NVIC Mux input 0 */ + def_irq_handler NvicMux1_IRQHandler /* CM0+ NVIC Mux input 1 */ + def_irq_handler NvicMux2_IRQHandler /* CM0+ NVIC Mux input 2 */ + def_irq_handler NvicMux3_IRQHandler /* CM0+ NVIC Mux input 3 */ + def_irq_handler NvicMux4_IRQHandler /* CM0+ NVIC Mux input 4 */ + def_irq_handler NvicMux5_IRQHandler /* CM0+ NVIC Mux input 5 */ + def_irq_handler NvicMux6_IRQHandler /* CM0+ NVIC Mux input 6 */ + def_irq_handler NvicMux7_IRQHandler /* CM0+ NVIC Mux input 7 */ + def_irq_handler NvicMux8_IRQHandler /* CM0+ NVIC Mux input 8 */ + def_irq_handler NvicMux9_IRQHandler /* CM0+ NVIC Mux input 9 */ + def_irq_handler NvicMux10_IRQHandler /* CM0+ NVIC Mux input 10 */ + def_irq_handler NvicMux11_IRQHandler /* CM0+ NVIC Mux input 11 */ + def_irq_handler NvicMux12_IRQHandler /* CM0+ NVIC Mux input 12 */ + def_irq_handler NvicMux13_IRQHandler /* CM0+ NVIC Mux input 13 */ + def_irq_handler NvicMux14_IRQHandler /* CM0+ NVIC Mux input 14 */ + def_irq_handler NvicMux15_IRQHandler /* CM0+ NVIC Mux input 15 */ + def_irq_handler NvicMux16_IRQHandler /* CM0+ NVIC Mux input 16 */ + def_irq_handler NvicMux17_IRQHandler /* CM0+ NVIC Mux input 17 */ + def_irq_handler NvicMux18_IRQHandler /* CM0+ NVIC Mux input 18 */ + def_irq_handler NvicMux19_IRQHandler /* CM0+ NVIC Mux input 19 */ + def_irq_handler NvicMux20_IRQHandler /* CM0+ NVIC Mux input 20 */ + def_irq_handler NvicMux21_IRQHandler /* CM0+ NVIC Mux input 21 */ + def_irq_handler NvicMux22_IRQHandler /* CM0+ NVIC Mux input 22 */ + def_irq_handler NvicMux23_IRQHandler /* CM0+ NVIC Mux input 23 */ + def_irq_handler NvicMux24_IRQHandler /* CM0+ NVIC Mux input 24 */ + def_irq_handler NvicMux25_IRQHandler /* CM0+ NVIC Mux input 25 */ + def_irq_handler NvicMux26_IRQHandler /* CM0+ NVIC Mux input 26 */ + def_irq_handler NvicMux27_IRQHandler /* CM0+ NVIC Mux input 27 */ + def_irq_handler NvicMux28_IRQHandler /* CM0+ NVIC Mux input 28 */ + def_irq_handler NvicMux29_IRQHandler /* CM0+ NVIC Mux input 29 */ + def_irq_handler NvicMux30_IRQHandler /* CM0+ NVIC Mux input 30 */ + def_irq_handler NvicMux31_IRQHandler /* CM0+ NVIC Mux input 31 */ + + .end + + +/* [] END OF FILE */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM0P/TOOLCHAIN_IAR/cy8c6xx7_cm0plus.icf b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM0P/TOOLCHAIN_IAR/cy8c6xx7_cm0plus.icf new file mode 100644 index 00000000000..3b98b65c351 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM0P/TOOLCHAIN_IAR/cy8c6xx7_cm0plus.icf @@ -0,0 +1,288 @@ +/***************************************************************************//** +* \file cy8c6xx7_cm0plus.icf +* \version 2.60 +* +* Linker file for the IAR compiler. +* +* The main purpose of the linker script is to describe how the sections in the +* input files should be mapped into the output file, and to control the memory +* layout of the output file. +* +* \note The entry point is fixed and starts at 0x10000000. The valid application +* image should be placed there. +* +* \note The linker files included with the PDL template projects must be generic +* and handle all common use cases. Your project may not use every section +* defined in the linker files. In that case you may see warnings during the +* build process. In your project, you can simply comment out or remove the +* relevant code in the linker file. +* +******************************************************************************** +* \copyright +* Copyright 2016-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*******************************************************************************/ + +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_4.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; + +if (!isdefinedsymbol(MBED_ROM_START)) { + define symbol MBED_ROM_START = 0x10000000; +} + +/* MBED_APP_START is being used by the bootloader build script and + * will be calculate by the system. Without bootloader the MBED_APP_START + * is equal to MBED_ROM_START + */ +if (!isdefinedsymbol(MBED_APP_START)) { + define symbol MBED_APP_START = MBED_ROM_START; +} + +if (!isdefinedsymbol(MBED_ROM_SIZE)) { + define symbol MBED_ROM_SIZE = 0x80000; +} + +/* MBED_APP_SIZE is being used by the bootloader build script and + * will be calculate by the system. Without bootloader the MBED_APP_SIZE + * is equal to MBED_ROM_SIZE + */ +if (!isdefinedsymbol(MBED_APP_SIZE)) { + define symbol MBED_APP_SIZE = MBED_ROM_SIZE; +} + +if (!isdefinedsymbol(MBED_RAM_START)) { + define symbol MBED_RAM_START = 0x08000000; +} + +if (!isdefinedsymbol(MBED_RAM_SIZE)) { + define symbol MBED_RAM_SIZE = 0x00010000; +} + +/*-Sizes-*/ +if (!isdefinedsymbol(MBED_PUBLIC_RAM_SIZE)) { + define symbol MBED_PUBLIC_RAM_SIZE = 0x200; +} +if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) { + + if (!isdefinedsymbol(__STACK_SIZE)) { + define symbol MBED_BOOT_STACK_SIZE = 0x0400; + } else { + define symbol MBED_BOOT_STACK_SIZE = __STACK_SIZE; + } +} + +define symbol __ICFEDIT_size_cstack__ = MBED_BOOT_STACK_SIZE; + +define symbol __ICFEDIT_size_proc_stack__ = 0x0; + +/* Defines the minimum heap size. The actual heap size will be expanded to the end of the stack region */ +if (!isdefinedsymbol(__HEAP_SIZE)) { + define symbol __ICFEDIT_size_heap__ = 0x0400; +} else { + define symbol __ICFEDIT_size_heap__ = __HEAP_SIZE; +} + +if (!isdefinedsymbol(MBED_PUBLIC_RAM_START)) { + define symbol MBED_PUBLIC_RAM_START = (MBED_RAM_START + MBED_RAM_SIZE - __ICFEDIT_size_cstack__ - MBED_PUBLIC_RAM_SIZE); +} + +/* The symbols below define the location and size of blocks of memory in the target. + * Use these symbols to specify the memory regions available for allocation. + */ + +/* The following symbols control RAM and flash memory allocation for the CM0+ core. + * You can change the memory allocation by editing RAM and Flash symbols. + * Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use. + * Using this memory region for other purposes will lead to unexpected behavior. + * Your changes must be aligned with the corresponding symbols for CM4 core in 'xx_cm4_dual.icf', + * where 'xx' is the device group; for example, 'cy8c6xx7_cm4_dual.icf'. + */ +/* RAM */ +define symbol __ICFEDIT_region_IRAM1_start__ = MBED_RAM_START; +define symbol __ICFEDIT_region_IRAM1_end__ = (MBED_RAM_START + MBED_RAM_SIZE); +/* Public RAM */ +define symbol __ICFEDIT_region_IRAM2_start__ = MBED_PUBLIC_RAM_START; +define symbol __ICFEDIT_region_IRAM2_end__ = (MBED_PUBLIC_RAM_START + MBED_PUBLIC_RAM_SIZE); +/* Flash */ +define symbol __ICFEDIT_region_IROM1_start__ = MBED_APP_START; +define symbol __ICFEDIT_region_IROM1_end__ = (MBED_APP_START + MBED_APP_SIZE - 0x8000); + +/* The following symbols define a 32K flash region used for EEPROM emulation. + * This region can also be used as the general purpose flash. + * You can assign sections to this memory region for only one of the cores. + * Note some middleware (e.g. BLE, Emulated EEPROM) can place their data into this memory region. + * Therefore, repurposing this memory region will prevent such middleware from operation. + */ +define symbol __ICFEDIT_region_IROM2_start__ = 0x14000000; +define symbol __ICFEDIT_region_IROM2_end__ = 0x14007FFF; + +/* The following symbols define device specific memory regions and must not be changed. */ +/* Supervisory FLASH - User Data */ +define symbol __ICFEDIT_region_IROM3_start__ = 0x16000800; +define symbol __ICFEDIT_region_IROM3_end__ = 0x160007FF; + +/* Supervisory FLASH - Normal Access Restrictions (NAR) */ +define symbol __ICFEDIT_region_IROM4_start__ = 0x16001A00; +define symbol __ICFEDIT_region_IROM4_end__ = 0x16001BFF; + +/* Supervisory FLASH - Public Key */ +define symbol __ICFEDIT_region_IROM5_start__ = 0x16005A00; +define symbol __ICFEDIT_region_IROM5_end__ = 0x160065FF; + +/* Supervisory FLASH - Table of Content # 2 */ +define symbol __ICFEDIT_region_IROM6_start__ = 0x16007C00; +define symbol __ICFEDIT_region_IROM6_end__ = 0x16007DFF; + +/* Supervisory FLASH - Table of Content # 2 Copy */ +define symbol __ICFEDIT_region_IROM7_start__ = 0x16007E00; +define symbol __ICFEDIT_region_IROM7_end__ = 0x16007FFF; + +/* eFuse */ +define symbol __ICFEDIT_region_IROM8_start__ = 0x90700000; +define symbol __ICFEDIT_region_IROM8_end__ = 0x907FFFFF; + +/* XIP */ +define symbol __ICFEDIT_region_EROM1_start__ = 0x18000000; +define symbol __ICFEDIT_region_EROM1_end__ = 0x1FFFFFFF; + +define symbol __ICFEDIT_region_EROM2_start__ = 0x0; +define symbol __ICFEDIT_region_EROM2_end__ = 0x0; +define symbol __ICFEDIT_region_EROM3_start__ = 0x0; +define symbol __ICFEDIT_region_EROM3_end__ = 0x0; + +define symbol __ICFEDIT_region_ERAM1_start__ = 0x0; +define symbol __ICFEDIT_region_ERAM1_end__ = 0x0; +define symbol __ICFEDIT_region_ERAM2_start__ = 0x0; +define symbol __ICFEDIT_region_ERAM2_end__ = 0x0; +define symbol __ICFEDIT_region_ERAM3_start__ = 0x0; +define symbol __ICFEDIT_region_ERAM3_end__ = 0x0; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region IROM1_region = mem:[from __ICFEDIT_region_IROM1_start__ to __ICFEDIT_region_IROM1_end__]; +define region IROM2_region = mem:[from __ICFEDIT_region_IROM2_start__ to __ICFEDIT_region_IROM2_end__]; +define region IROM3_region = mem:[from __ICFEDIT_region_IROM3_start__ to __ICFEDIT_region_IROM3_end__]; +define region IROM4_region = mem:[from __ICFEDIT_region_IROM4_start__ to __ICFEDIT_region_IROM4_end__]; +define region IROM5_region = mem:[from __ICFEDIT_region_IROM5_start__ to __ICFEDIT_region_IROM5_end__]; +define region IROM6_region = mem:[from __ICFEDIT_region_IROM6_start__ to __ICFEDIT_region_IROM6_end__]; +define region IROM7_region = mem:[from __ICFEDIT_region_IROM7_start__ to __ICFEDIT_region_IROM7_end__]; +define region IROM8_region = mem:[from __ICFEDIT_region_IROM8_start__ to __ICFEDIT_region_IROM8_end__]; +define region EROM1_region = mem:[from __ICFEDIT_region_EROM1_start__ to __ICFEDIT_region_EROM1_end__]; +define region IRAM1_region = mem:[from __ICFEDIT_region_IRAM1_start__ to __ICFEDIT_region_IRAM1_end__]; +define region IRAM2_region = mem:[from __ICFEDIT_region_IRAM2_start__ to __ICFEDIT_region_IRAM2_end__]; + +define block RAM_DATA {readwrite section .data}; +define block RAM_OTHER {readwrite section * }; +define block RAM_NOINIT {readwrite section .noinit}; +define block RAM_BSS {readwrite section .bss}; +define block RAM with fixed order {block RAM_DATA, block RAM_OTHER, block RAM_NOINIT, block RAM_BSS}; +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block PROC_STACK with alignment = 8, size = __ICFEDIT_size_proc_stack__ { }; +define block HEAP with expanding size, alignment = 8, minimum size = __ICFEDIT_size_heap__ { }; +define block HSTACK {block HEAP, block PROC_STACK, last block CSTACK}; +define block RO {first section .intvec, readonly}; + +/*-Initializations-*/ +initialize by copy { readwrite }; +do not initialize { section .noinit, section .intvec_ram }; + + +/*-Placement-*/ + +/* Flash - Cortex-M0+ application */ +".cy_app_header" : place at start of IROM1_region { section .cy_app_header }; +place in IROM1_region { block RO }; + +/* Emulated EEPROM Flash area */ +".cy_em_eeprom" : place at start of IROM2_region { section .cy_em_eeprom }; + +/* Supervisory Flash - User Data */ +".cy_sflash_user_data" : place at start of IROM3_region { section .cy_sflash_user_data }; + +/* Supervisory Flash - NAR */ +".cy_sflash_nar" : place at start of IROM4_region { section .cy_sflash_nar }; + +/* Supervisory Flash - Public Key */ +".cy_sflash_public_key" : place at start of IROM5_region { section .cy_sflash_public_key }; + +/* Supervisory Flash - TOC2 */ +".cy_toc_part2" : place at start of IROM6_region { section .cy_toc_part2 }; + +/* Supervisory Flash - RTOC2 */ +".cy_rtoc_part2" : place at start of IROM7_region { section .cy_rtoc_part2 }; + +/* eFuse */ +".cy_efuse" : place at start of IROM8_region { section .cy_efuse }; + +/* Execute in Place (XIP). See the smif driver documentation for details. */ +".cy_xip" : place at start of EROM1_region { section .cy_xip }; + +/* RAM */ +place at start of IRAM1_region { readwrite section .intvec_ram}; +place in IRAM1_region { block RAM}; +place in IRAM1_region { readwrite section .cy_ramfunc }; +place at end of IRAM1_region { block HSTACK }; + +/* Public RAM */ +place at start of IRAM2_region { section .cy_sharedmem }; + +/* These sections are used for additional metadata (silicon revision, Silicon/JTAG ID, etc.) storage. */ +".cymeta" : place at address mem : 0x90500000 { readonly section .cymeta }; + + +keep { section .cy_app_header, + section .cy_em_eeprom, + section .cy_sflash_user_data, + section .cy_sflash_nar, + section .cy_sflash_public_key, + section .cy_toc_part2, + section .cy_rtoc_part2, + section .cy_efuse, + section .cy_xip, + section .cymeta, + }; + + +/* The following symbols used by the cymcuelftool. */ +/* Flash */ +define exported symbol __cy_memory_0_start = 0x10000000; +define exported symbol __cy_memory_0_length = 0x00100000; +define exported symbol __cy_memory_0_row_size = 0x200; + +/* Emulated EEPROM Flash area */ +define exported symbol __cy_memory_1_start = 0x14000000; +define exported symbol __cy_memory_1_length = 0x8000; +define exported symbol __cy_memory_1_row_size = 0x200; + +/* Supervisory Flash */ +define exported symbol __cy_memory_2_start = 0x16000000; +define exported symbol __cy_memory_2_length = 0x8000; +define exported symbol __cy_memory_2_row_size = 0x200; + +/* XIP */ +define exported symbol __cy_memory_3_start = 0x18000000; +define exported symbol __cy_memory_3_length = 0x08000000; +define exported symbol __cy_memory_3_row_size = 0x200; + +/* eFuse */ +define exported symbol __cy_memory_4_start = 0x90700000; +define exported symbol __cy_memory_4_length = 0x100000; +define exported symbol __cy_memory_4_row_size = 1; + +/* EOF */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM0P/TOOLCHAIN_IAR/startup_psoc6_01_cm0plus.S b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM0P/TOOLCHAIN_IAR/startup_psoc6_01_cm0plus.S new file mode 100644 index 00000000000..e926966cf7e --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM0P/TOOLCHAIN_IAR/startup_psoc6_01_cm0plus.S @@ -0,0 +1,413 @@ +;/**************************************************************************//** +; * @file startup_psoc6_01_cm0plus.S +; * @brief CMSIS Core Device Startup File for +; * ARMCM0plus Device Series +; * @version V5.00 +; * @date 08. March 2016 +; ******************************************************************************/ +;/* +; * Copyright (c) 2009-2016 ARM Limited. All rights reserved. +; * +; * SPDX-License-Identifier: Apache-2.0 +; * +; * Licensed under the Apache License, Version 2.0 (the License); you may +; * not use this file except in compliance with the License. +; * You may obtain a copy of the License at +; * +; * www.apache.org/licenses/LICENSE-2.0 +; * +; * Unless required by applicable law or agreed to in writing, software +; * distributed under the License is distributed on an AS IS BASIS, WITHOUT +; * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +; * See the License for the specific language governing permissions and +; * limitations under the License. +; */ + +; +; The modules in this file are included in the libraries, and may be replaced +; by any user-defined modules that define the PUBLIC symbol _program_start or +; a user defined start symbol. +; To override the cstartup defined in the library, simply add your modified +; version to the workbench project. +; +; The vector table is normally located at address 0. +; When debugging in RAM, it can be located in RAM, aligned to at least 2^6. +; The name "__vector_table" has special meaning for C-SPY: +; it is where the SP start value is found, and the NVIC vector +; table register (VTOR) is initialized to this address if != 0. +; +; Cortex-M version +; + + MODULE ?cstartup + + ;; Forward declaration of sections. + SECTION CSTACK:DATA:NOROOT(3) + SECTION .intvec_ram:DATA:NOROOT(2) + SECTION .intvec:CODE:NOROOT(2) + + EXTERN __iar_program_start + EXTERN SystemInit + EXTERN __iar_data_init3 + PUBLIC __vector_table + PUBLIC __vector_table_0x1c + PUBLIC __Vectors + PUBLIC __Vectors_End + PUBLIC __Vectors_Size + PUBLIC __ramVectors + + DATA + +__vector_table + DCD sfe(CSTACK) + DCD Reset_Handler + + DCD 0x0000000D ; NMI_Handler is defined in ROM code + DCD HardFault_Handler + DCD 0 + DCD 0 + DCD 0 +__vector_table_0x1c + DCD 0 + DCD 0 + DCD 0 + DCD 0 + DCD SVC_Handler + DCD 0 + DCD 0 + DCD PendSV_Handler + DCD SysTick_Handler + + ; External interrupts Description + DCD NvicMux0_IRQHandler ; CM0+ NVIC Mux input 0 + DCD NvicMux1_IRQHandler ; CM0+ NVIC Mux input 1 + DCD NvicMux2_IRQHandler ; CM0+ NVIC Mux input 2 + DCD NvicMux3_IRQHandler ; CM0+ NVIC Mux input 3 + DCD NvicMux4_IRQHandler ; CM0+ NVIC Mux input 4 + DCD NvicMux5_IRQHandler ; CM0+ NVIC Mux input 5 + DCD NvicMux6_IRQHandler ; CM0+ NVIC Mux input 6 + DCD NvicMux7_IRQHandler ; CM0+ NVIC Mux input 7 + DCD NvicMux8_IRQHandler ; CM0+ NVIC Mux input 8 + DCD NvicMux9_IRQHandler ; CM0+ NVIC Mux input 9 + DCD NvicMux10_IRQHandler ; CM0+ NVIC Mux input 10 + DCD NvicMux11_IRQHandler ; CM0+ NVIC Mux input 11 + DCD NvicMux12_IRQHandler ; CM0+ NVIC Mux input 12 + DCD NvicMux13_IRQHandler ; CM0+ NVIC Mux input 13 + DCD NvicMux14_IRQHandler ; CM0+ NVIC Mux input 14 + DCD NvicMux15_IRQHandler ; CM0+ NVIC Mux input 15 + DCD NvicMux16_IRQHandler ; CM0+ NVIC Mux input 16 + DCD NvicMux17_IRQHandler ; CM0+ NVIC Mux input 17 + DCD NvicMux18_IRQHandler ; CM0+ NVIC Mux input 18 + DCD NvicMux19_IRQHandler ; CM0+ NVIC Mux input 19 + DCD NvicMux20_IRQHandler ; CM0+ NVIC Mux input 20 + DCD NvicMux21_IRQHandler ; CM0+ NVIC Mux input 21 + DCD NvicMux22_IRQHandler ; CM0+ NVIC Mux input 22 + DCD NvicMux23_IRQHandler ; CM0+ NVIC Mux input 23 + DCD NvicMux24_IRQHandler ; CM0+ NVIC Mux input 24 + DCD NvicMux25_IRQHandler ; CM0+ NVIC Mux input 25 + DCD NvicMux26_IRQHandler ; CM0+ NVIC Mux input 26 + DCD NvicMux27_IRQHandler ; CM0+ NVIC Mux input 27 + DCD NvicMux28_IRQHandler ; CM0+ NVIC Mux input 28 + DCD NvicMux29_IRQHandler ; CM0+ NVIC Mux input 29 + DCD NvicMux30_IRQHandler ; CM0+ NVIC Mux input 30 + DCD NvicMux31_IRQHandler ; CM0+ NVIC Mux input 31 + +__Vectors_End + +__Vectors EQU __vector_table +__Vectors_Size EQU __Vectors_End - __Vectors + + SECTION .intvec_ram:DATA:REORDER:NOROOT(2) +__ramVectors + DS32 __Vectors_Size + + + THUMB + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Default handlers +;; + PUBWEAK Default_Handler + SECTION .text:CODE:REORDER:NOROOT(2) +Default_Handler + B Default_Handler + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Weak function for startup customization +;; +;; Note. The global resources are not yet initialized (for example global variables, peripherals, clocks) +;; because this function is executed as the first instruction in the ResetHandler. +;; The PDL is also not initialized to use the proper register offsets. +;; The user of this function is responsible for initializing the PDL and resources before using them. +;; + PUBWEAK Cy_OnResetUser + SECTION .text:CODE:REORDER:NOROOT(2) +Cy_OnResetUser + BX LR + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Define strong version to return zero for +;; __iar_program_start to skip data sections +;; initialization. +;; + PUBLIC __low_level_init + SECTION .text:CODE:REORDER:NOROOT(2) +__low_level_init + MOVS R0, #0 + BX LR + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Default interrupt handlers. +;; + THUMB + PUBWEAK Reset_Handler + SECTION .text:CODE:REORDER:NOROOT(2) +Reset_Handler + + ; Define strong function for startup customization + LDR R0, =Cy_OnResetUser + BLX R0 + + ; Copy vectors from ROM to RAM + LDR r1, =__vector_table + LDR r0, =__ramVectors + LDR r2, =__Vectors_Size +intvec_copy + LDR r3, [r1] + STR r3, [r0] + ADDS r0, r0, #4 + ADDS r1, r1, #4 + SUBS r2, r2, #1 + CMP r2, #0 + BNE intvec_copy + + ; Update Vector Table Offset Register + LDR r0, =__ramVectors + LDR r1, =0xE000ED08 + STR r0, [r1] + dsb + + LDR R0, =__iar_program_start + BLX R0 + +; Should never get here +Cy_Main_Exited + B Cy_Main_Exited + + + PUBWEAK NMI_Handler + SECTION .text:CODE:REORDER:NOROOT(1) +NMI_Handler + B NMI_Handler + + + PUBWEAK Cy_SysLib_FaultHandler + SECTION .text:CODE:REORDER:NOROOT(1) +Cy_SysLib_FaultHandler + B Cy_SysLib_FaultHandler + + PUBWEAK HardFault_Handler + SECTION .text:CODE:REORDER:NOROOT(1) +HardFault_Handler + IMPORT Cy_SysLib_FaultHandler + movs r0, #4 + mov r1, LR + tst r0, r1 + beq L_MSP + mrs r0, PSP + b L_API_call +L_MSP + mrs r0, MSP +L_API_call + ; Storing LR content for Creator call stack trace + push {LR} + bl Cy_SysLib_FaultHandler + + + PUBWEAK SVC_Handler + SECTION .text:CODE:REORDER:NOROOT(1) +SVC_Handler + B SVC_Handler + + PUBWEAK PendSV_Handler + SECTION .text:CODE:REORDER:NOROOT(1) +PendSV_Handler + B PendSV_Handler + + PUBWEAK SysTick_Handler + SECTION .text:CODE:REORDER:NOROOT(1) +SysTick_Handler + B SysTick_Handler + + + ; External interrupts + PUBWEAK NvicMux0_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux0_IRQHandler + B NvicMux0_IRQHandler + + PUBWEAK NvicMux1_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux1_IRQHandler + B NvicMux1_IRQHandler + + PUBWEAK NvicMux2_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux2_IRQHandler + B NvicMux2_IRQHandler + + PUBWEAK NvicMux3_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux3_IRQHandler + B NvicMux3_IRQHandler + + PUBWEAK NvicMux4_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux4_IRQHandler + B NvicMux4_IRQHandler + + PUBWEAK NvicMux5_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux5_IRQHandler + B NvicMux5_IRQHandler + + PUBWEAK NvicMux6_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux6_IRQHandler + B NvicMux6_IRQHandler + + PUBWEAK NvicMux7_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux7_IRQHandler + B NvicMux7_IRQHandler + + PUBWEAK NvicMux8_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux8_IRQHandler + B NvicMux8_IRQHandler + + PUBWEAK NvicMux9_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux9_IRQHandler + B NvicMux9_IRQHandler + + PUBWEAK NvicMux10_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux10_IRQHandler + B NvicMux10_IRQHandler + + PUBWEAK NvicMux11_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux11_IRQHandler + B NvicMux11_IRQHandler + + PUBWEAK NvicMux12_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux12_IRQHandler + B NvicMux12_IRQHandler + + PUBWEAK NvicMux13_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux13_IRQHandler + B NvicMux13_IRQHandler + + PUBWEAK NvicMux14_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux14_IRQHandler + B NvicMux14_IRQHandler + + PUBWEAK NvicMux15_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux15_IRQHandler + B NvicMux15_IRQHandler + + PUBWEAK NvicMux16_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux16_IRQHandler + B NvicMux16_IRQHandler + + PUBWEAK NvicMux17_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux17_IRQHandler + B NvicMux17_IRQHandler + + PUBWEAK NvicMux18_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux18_IRQHandler + B NvicMux18_IRQHandler + + PUBWEAK NvicMux19_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux19_IRQHandler + B NvicMux19_IRQHandler + + PUBWEAK NvicMux20_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux20_IRQHandler + B NvicMux20_IRQHandler + + PUBWEAK NvicMux21_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux21_IRQHandler + B NvicMux21_IRQHandler + + PUBWEAK NvicMux22_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux22_IRQHandler + B NvicMux22_IRQHandler + + PUBWEAK NvicMux23_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux23_IRQHandler + B NvicMux23_IRQHandler + + PUBWEAK NvicMux24_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux24_IRQHandler + B NvicMux24_IRQHandler + + PUBWEAK NvicMux25_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux25_IRQHandler + B NvicMux25_IRQHandler + + PUBWEAK NvicMux26_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux26_IRQHandler + B NvicMux26_IRQHandler + + PUBWEAK NvicMux27_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux27_IRQHandler + B NvicMux27_IRQHandler + + PUBWEAK NvicMux28_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux28_IRQHandler + B NvicMux28_IRQHandler + + PUBWEAK NvicMux29_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux29_IRQHandler + B NvicMux29_IRQHandler + + PUBWEAK NvicMux30_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux30_IRQHandler + B NvicMux30_IRQHandler + + PUBWEAK NvicMux31_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +NvicMux31_IRQHandler + B NvicMux31_IRQHandler + + + END + + +; [] END OF FILE diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM0P/system_psoc6_cm0plus.c b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM0P/system_psoc6_cm0plus.c new file mode 100644 index 00000000000..9164b15dd6f --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM0P/system_psoc6_cm0plus.c @@ -0,0 +1,710 @@ +/***************************************************************************//** +* \file system_psoc6_cm0plus.c +* \version 2.60 +* +* The device system-source file. +* +******************************************************************************** +* \copyright +* Copyright 2016-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*******************************************************************************/ + +#include +#include "system_psoc6.h" +#include "cy_device.h" +#include "cy_device_headers.h" +#include "cy_syslib.h" +#include "cy_wdt.h" + +#if !defined(CY_IPC_DEFAULT_CFG_DISABLE) + #include "cy_ipc_sema.h" + #include "cy_ipc_pipe.h" + #include "cy_ipc_drv.h" + + #if defined(CY_DEVICE_PSOC6ABLE2) + #include "cy_flash.h" + #endif /* defined(CY_DEVICE_PSOC6ABLE2) */ + +#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */ + + +/******************************************************************************* +* SystemCoreClockUpdate() +*******************************************************************************/ + +/** Default HFClk frequency in Hz */ +#define CY_CLK_HFCLK0_FREQ_HZ_DEFAULT (8000000UL) + +/** Default PeriClk frequency in Hz */ +#define CY_CLK_PERICLK_FREQ_HZ_DEFAULT (4000000UL) + +/** Default SlowClk system core frequency in Hz */ +#define CY_CLK_SYSTEM_FREQ_HZ_DEFAULT (4000000UL) + +/** IMO frequency in Hz */ +#define CY_CLK_IMO_FREQ_HZ (8000000UL) + +/** HVILO frequency in Hz */ +#define CY_CLK_HVILO_FREQ_HZ (32000UL) + +/** PILO frequency in Hz */ +#define CY_CLK_PILO_FREQ_HZ (32768UL) + +/** WCO frequency in Hz */ +#define CY_CLK_WCO_FREQ_HZ (32768UL) + +/** ALTLF frequency in Hz */ +#define CY_CLK_ALTLF_FREQ_HZ (32768UL) + + +/** +* Holds the SlowClk (Cortex-M0+) or FastClk (Cortex-M4) system core clock, +* which is the system clock frequency supplied to the SysTick timer and the +* processor core clock. +* This variable implements CMSIS Core global variable. +* Refer to the [CMSIS documentation] +* (http://www.keil.com/pack/doc/CMSIS/Core/html/group__system__init__gr.html "System and Clock Configuration") +* for more details. +* This variable can be used by debuggers to query the frequency +* of the debug timer or to configure the trace clock speed. +* +* \attention Compilers must be configured to avoid removing this variable in case +* the application program is not using it. Debugging systems require the variable +* to be physically present in memory so that it can be examined to configure the debugger. */ +uint32_t SystemCoreClock = CY_CLK_SYSTEM_FREQ_HZ_DEFAULT; + +/** Holds the HFClk0 clock frequency. Updated by \ref SystemCoreClockUpdate(). */ +uint32_t cy_Hfclk0FreqHz = CY_CLK_HFCLK0_FREQ_HZ_DEFAULT; + +/** Holds the PeriClk clock frequency. Updated by \ref SystemCoreClockUpdate(). */ +uint32_t cy_PeriClkFreqHz = CY_CLK_PERICLK_FREQ_HZ_DEFAULT; + +/** Holds the Alternate high frequency clock in Hz. Updated by \ref SystemCoreClockUpdate(). */ +#if (defined (CY_IP_MXBLESS) && (CY_IP_MXBLESS == 1UL)) || defined (CY_DOXYGEN) + uint32_t cy_BleEcoClockFreqHz = CY_CLK_ALTHF_FREQ_HZ; +#endif /* (defined (CY_IP_MXBLESS) && (CY_IP_MXBLESS == 1UL)) || defined (CY_DOXYGEN) */ + + +/******************************************************************************* +* SystemInit() +*******************************************************************************/ + +/* CLK_FLL_CONFIG default values */ +#define CY_FB_CLK_FLL_CONFIG_VALUE (0x01000000u) +#define CY_FB_CLK_FLL_CONFIG2_VALUE (0x00020001u) +#define CY_FB_CLK_FLL_CONFIG3_VALUE (0x00002800u) +#define CY_FB_CLK_FLL_CONFIG4_VALUE (0x000000FFu) + + +/******************************************************************************* +* SystemCoreClockUpdate (void) +*******************************************************************************/ + +/* Do not use these definitions directly in your application */ +#define CY_DELAY_MS_OVERFLOW_THRESHOLD (0x8000u) +#define CY_DELAY_1K_THRESHOLD (1000u) +#define CY_DELAY_1K_MINUS_1_THRESHOLD (CY_DELAY_1K_THRESHOLD - 1u) +#define CY_DELAY_1M_THRESHOLD (1000000u) +#define CY_DELAY_1M_MINUS_1_THRESHOLD (CY_DELAY_1M_THRESHOLD - 1u) +uint32_t cy_delayFreqHz = CY_CLK_SYSTEM_FREQ_HZ_DEFAULT; + +uint32_t cy_delayFreqKhz = (CY_CLK_SYSTEM_FREQ_HZ_DEFAULT + CY_DELAY_1K_MINUS_1_THRESHOLD) / + CY_DELAY_1K_THRESHOLD; + +uint8_t cy_delayFreqMhz = (uint8_t)((CY_CLK_SYSTEM_FREQ_HZ_DEFAULT + CY_DELAY_1M_MINUS_1_THRESHOLD) / + CY_DELAY_1M_THRESHOLD); + +uint32_t cy_delay32kMs = CY_DELAY_MS_OVERFLOW_THRESHOLD * + ((CY_CLK_SYSTEM_FREQ_HZ_DEFAULT + CY_DELAY_1K_MINUS_1_THRESHOLD) / CY_DELAY_1K_THRESHOLD); + +#define CY_ROOT_PATH_SRC_IMO (0UL) +#define CY_ROOT_PATH_SRC_EXT (1UL) +#if (SRSS_ECO_PRESENT == 1U) + #define CY_ROOT_PATH_SRC_ECO (2UL) +#endif /* (SRSS_ECO_PRESENT == 1U) */ +#if (SRSS_ALTHF_PRESENT == 1U) + #define CY_ROOT_PATH_SRC_ALTHF (3UL) +#endif /* (SRSS_ALTHF_PRESENT == 1U) */ +#define CY_ROOT_PATH_SRC_DSI_MUX (4UL) +#define CY_ROOT_PATH_SRC_DSI_MUX_HVILO (16UL) +#define CY_ROOT_PATH_SRC_DSI_MUX_WCO (17UL) +#if (SRSS_ALTLF_PRESENT == 1U) + #define CY_ROOT_PATH_SRC_DSI_MUX_ALTLF (18UL) +#endif /* (SRSS_ALTLF_PRESENT == 1U) */ +#if (SRSS_PILO_PRESENT == 1U) + #define CY_ROOT_PATH_SRC_DSI_MUX_PILO (19UL) +#endif /* (SRSS_PILO_PRESENT == 1U) */ + + +/******************************************************************************* +* Cy_SysEnableCM4(), Cy_SysRetainCM4(), and Cy_SysResetCM4() +*******************************************************************************/ +#define CY_SYS_CM4_PWR_CTL_KEY_OPEN (0x05FAUL) +#define CY_SYS_CM4_PWR_CTL_KEY_CLOSE (0xFA05UL) +#define CY_SYS_CM4_VECTOR_TABLE_VALID_ADDR (0x000003FFUL) + + +/******************************************************************************* +* Function Name: SystemInit +****************************************************************************//** +* +* Initializes the system: +* - Restores FLL registers to the default state. +* - Unlocks and disables WDT. +* - Calls Cy_PDL_Init() function to define the driver library. +* - Calls the Cy_SystemInit() function, if compiled from PSoC Creator. +* - Calls \ref SystemCoreClockUpdate(). +* +*******************************************************************************/ +void SystemInit(void) +{ + Cy_PDL_Init(CY_DEVICE_CFG); + + /* Restore FLL registers to the default state as they are not restored by the ROM code */ + uint32_t copy = SRSS->CLK_FLL_CONFIG; + copy &= ~SRSS_CLK_FLL_CONFIG_FLL_ENABLE_Msk; + SRSS->CLK_FLL_CONFIG = copy; + + copy = SRSS->CLK_ROOT_SELECT[0u]; + copy &= ~SRSS_CLK_ROOT_SELECT_ROOT_DIV_Msk; /* Set ROOT_DIV = 0*/ + SRSS->CLK_ROOT_SELECT[0u] = copy; + + SRSS->CLK_FLL_CONFIG = CY_FB_CLK_FLL_CONFIG_VALUE; + SRSS->CLK_FLL_CONFIG2 = CY_FB_CLK_FLL_CONFIG2_VALUE; + SRSS->CLK_FLL_CONFIG3 = CY_FB_CLK_FLL_CONFIG3_VALUE; + SRSS->CLK_FLL_CONFIG4 = CY_FB_CLK_FLL_CONFIG4_VALUE; + + /* Unlock and disable WDT */ + Cy_WDT_Unlock(); + Cy_WDT_Disable(); + + Cy_SystemInit(); + SystemCoreClockUpdate(); + +#if defined(CY_DEVICE_PSOC6ABLE2) && !defined(CY_PSOC6ABLE2_REV_0A_SUPPORT_DISABLE) + if (CY_SYSLIB_DEVICE_REV_0A == Cy_SysLib_GetDeviceRevision()) + { + /* Clear data register of IPC structure #7, reserved for the Deep-Sleep operations. */ + IPC_STRUCT7->DATA = 0UL; + /* Release IPC structure #7 to avoid deadlocks in case of SW or WDT reset during Deep-Sleep entering. */ + IPC_STRUCT7->RELEASE = 0UL; + } +#endif /* defined(CY_DEVICE_PSOC6ABLE2) && !defined(CY_PSOC6ABLE2_REV_0A_SUPPORT_DISABLE) */ + +#if !defined(CY_IPC_DEFAULT_CFG_DISABLE) + /* Allocate and initialize semaphores for the system operations. */ + CY_SECTION(".cy_sharedmem") + static uint32_t ipcSemaArray[CY_IPC_SEMA_COUNT / CY_IPC_SEMA_PER_WORD]; + + (void) Cy_IPC_Sema_Init(CY_IPC_CHAN_SEMA, CY_IPC_SEMA_COUNT, ipcSemaArray); + + + /******************************************************************************** + * + * Initializes the system pipes. The system pipes are used by BLE and Flash. + * + * If the default startup file is not used, or SystemInit() is not called in your + * project, call the following three functions prior to executing any flash or + * EmEEPROM write or erase operation: + * -# Cy_IPC_Sema_Init() + * -# Cy_IPC_Pipe_Config() + * -# Cy_IPC_Pipe_Init() + * -# Cy_Flash_Init() + * + *******************************************************************************/ + + /* Create an array of endpoint structures */ + static cy_stc_ipc_pipe_ep_t systemIpcPipeEpArray[CY_IPC_MAX_ENDPOINTS]; + + Cy_IPC_Pipe_Config(systemIpcPipeEpArray); + + static cy_ipc_pipe_callback_ptr_t systemIpcPipeSysCbArray[CY_SYS_CYPIPE_CLIENT_CNT]; + + static const cy_stc_ipc_pipe_config_t systemIpcPipeConfigCm0 = + { + /* .ep0ConfigData */ + { + /* .ipcNotifierNumber */ CY_IPC_INTR_CYPIPE_EP0, + /* .ipcNotifierPriority */ CY_SYS_INTR_CYPIPE_PRIOR_EP0, + /* .ipcNotifierMuxNumber */ CY_SYS_INTR_CYPIPE_MUX_EP0, + /* .epAddress */ CY_IPC_EP_CYPIPE_CM0_ADDR, + /* .epConfig */ CY_SYS_CYPIPE_CONFIG_EP0 + }, + /* .ep1ConfigData */ + { + /* .ipcNotifierNumber */ CY_IPC_INTR_CYPIPE_EP1, + /* .ipcNotifierPriority */ CY_SYS_INTR_CYPIPE_PRIOR_EP1, + /* .ipcNotifierMuxNumber */ 0u, + /* .epAddress */ CY_IPC_EP_CYPIPE_CM4_ADDR, + /* .epConfig */ CY_SYS_CYPIPE_CONFIG_EP1 + }, + /* .endpointClientsCount */ CY_SYS_CYPIPE_CLIENT_CNT, + /* .endpointsCallbacksArray */ systemIpcPipeSysCbArray, + /* .userPipeIsrHandler */ &Cy_SysIpcPipeIsrCm0 + }; + + if (cy_device->flashPipeRequired != 0u) + { + Cy_IPC_Pipe_Init(&systemIpcPipeConfigCm0); + } + +#if defined(CY_DEVICE_PSOC6ABLE2) + Cy_Flash_Init(); +#endif /* defined(CY_DEVICE_PSOC6ABLE2) */ + +#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */ +} + + +/******************************************************************************* +* Function Name: Cy_SystemInit +****************************************************************************//** +* +* The function is called during device startup. Once project compiled as part of +* the PSoC Creator project, the Cy_SystemInit() function is generated by the +* PSoC Creator. +* +* The function generated by PSoC Creator performs all of the necessary device +* configuration based on the design settings. This includes settings from the +* Design Wide Resources (DWR) such as Clocks and Pins as well as any component +* configuration that is necessary. +* +*******************************************************************************/ +__WEAK void Cy_SystemInit(void) +{ + /* Empty weak function. The actual implementation to be in the PSoC Creator + * generated strong function. + */ +} + + +/******************************************************************************* +* Function Name: SystemCoreClockUpdate +****************************************************************************//** +* +* Gets core clock frequency and updates \ref SystemCoreClock, \ref +* cy_Hfclk0FreqHz, and \ref cy_PeriClkFreqHz. +* +* Updates global variables used by the \ref Cy_SysLib_Delay(), \ref +* Cy_SysLib_DelayUs(), and \ref Cy_SysLib_DelayCycles(). +* +*******************************************************************************/ +void SystemCoreClockUpdate (void) +{ + uint32_t srcFreqHz; + uint32_t pathFreqHz; + uint32_t slowClkDiv; + uint32_t periClkDiv; + uint32_t rootPath; + uint32_t srcClk; + + /* Get root path clock for the high-frequency clock # 0 */ + rootPath = _FLD2VAL(SRSS_CLK_ROOT_SELECT_ROOT_MUX, SRSS->CLK_ROOT_SELECT[0u]); + + /* Get source of the root path clock */ + srcClk = _FLD2VAL(SRSS_CLK_PATH_SELECT_PATH_MUX, SRSS->CLK_PATH_SELECT[rootPath]); + + /* Get frequency of the source */ + switch (srcClk) + { + case CY_ROOT_PATH_SRC_IMO: + srcFreqHz = CY_CLK_IMO_FREQ_HZ; + break; + + case CY_ROOT_PATH_SRC_EXT: + srcFreqHz = CY_CLK_EXT_FREQ_HZ; + break; + + #if (SRSS_ECO_PRESENT == 1U) + case CY_ROOT_PATH_SRC_ECO: + srcFreqHz = CY_CLK_ECO_FREQ_HZ; + break; + #endif /* (SRSS_ECO_PRESENT == 1U) */ + +#if defined (CY_IP_MXBLESS) && (CY_IP_MXBLESS == 1UL) && (SRSS_ALTHF_PRESENT == 1U) + case CY_ROOT_PATH_SRC_ALTHF: + srcFreqHz = cy_BleEcoClockFreqHz; + break; +#endif /* defined (CY_IP_MXBLESS) && (CY_IP_MXBLESS == 1UL) && (SRSS_ALTHF_PRESENT == 1U) */ + + case CY_ROOT_PATH_SRC_DSI_MUX: + { + uint32_t dsi_src; + dsi_src = _FLD2VAL(SRSS_CLK_DSI_SELECT_DSI_MUX, SRSS->CLK_DSI_SELECT[rootPath]); + switch (dsi_src) + { + case CY_ROOT_PATH_SRC_DSI_MUX_HVILO: + srcFreqHz = CY_CLK_HVILO_FREQ_HZ; + break; + + case CY_ROOT_PATH_SRC_DSI_MUX_WCO: + srcFreqHz = CY_CLK_WCO_FREQ_HZ; + break; + + #if (SRSS_ALTLF_PRESENT == 1U) + case CY_ROOT_PATH_SRC_DSI_MUX_ALTLF: + srcFreqHz = CY_CLK_ALTLF_FREQ_HZ; + break; + #endif /* (SRSS_ALTLF_PRESENT == 1U) */ + + #if (SRSS_PILO_PRESENT == 1U) + case CY_ROOT_PATH_SRC_DSI_MUX_PILO: + srcFreqHz = CY_CLK_PILO_FREQ_HZ; + break; + #endif /* (SRSS_PILO_PRESENT == 1U) */ + + default: + srcFreqHz = CY_CLK_HVILO_FREQ_HZ; + break; + } + } + break; + + default: + srcFreqHz = CY_CLK_EXT_FREQ_HZ; + break; + } + + if (rootPath == 0UL) + { + /* FLL */ + bool fllLocked = ( 0UL != _FLD2VAL(SRSS_CLK_FLL_STATUS_LOCKED, SRSS->CLK_FLL_STATUS)); + bool fllOutputOutput = ( 3UL == _FLD2VAL(SRSS_CLK_FLL_CONFIG3_BYPASS_SEL, SRSS->CLK_FLL_CONFIG3)); + bool fllOutputAuto = ((0UL == _FLD2VAL(SRSS_CLK_FLL_CONFIG3_BYPASS_SEL, SRSS->CLK_FLL_CONFIG3)) || + (1UL == _FLD2VAL(SRSS_CLK_FLL_CONFIG3_BYPASS_SEL, SRSS->CLK_FLL_CONFIG3))); + if ((fllOutputAuto && fllLocked) || fllOutputOutput) + { + uint32_t fllMult; + uint32_t refDiv; + uint32_t outputDiv; + + fllMult = _FLD2VAL(SRSS_CLK_FLL_CONFIG_FLL_MULT, SRSS->CLK_FLL_CONFIG); + refDiv = _FLD2VAL(SRSS_CLK_FLL_CONFIG2_FLL_REF_DIV, SRSS->CLK_FLL_CONFIG2); + outputDiv = _FLD2VAL(SRSS_CLK_FLL_CONFIG_FLL_OUTPUT_DIV, SRSS->CLK_FLL_CONFIG) + 1UL; + + pathFreqHz = ((srcFreqHz / refDiv) * fllMult) / outputDiv; + } + else + { + pathFreqHz = srcFreqHz; + } + } + else if ((rootPath == 1UL) || (rootPath == 2UL)) + { + /* PLL */ + bool pllLocked = ( 0UL != _FLD2VAL(SRSS_CLK_PLL_STATUS_LOCKED, SRSS->CLK_PLL_STATUS[rootPath - 1UL])); + bool pllOutputOutput = ( 3UL == _FLD2VAL(SRSS_CLK_PLL_CONFIG_BYPASS_SEL, SRSS->CLK_PLL_CONFIG[rootPath - 1UL])); + bool pllOutputAuto = ((0UL == _FLD2VAL(SRSS_CLK_PLL_CONFIG_BYPASS_SEL, SRSS->CLK_PLL_CONFIG[rootPath - 1UL])) || + (1UL == _FLD2VAL(SRSS_CLK_PLL_CONFIG_BYPASS_SEL, SRSS->CLK_PLL_CONFIG[rootPath - 1UL]))); + if ((pllOutputAuto && pllLocked) || pllOutputOutput) + { + uint32_t feedbackDiv; + uint32_t referenceDiv; + uint32_t outputDiv; + + feedbackDiv = _FLD2VAL(SRSS_CLK_PLL_CONFIG_FEEDBACK_DIV, SRSS->CLK_PLL_CONFIG[rootPath - 1UL]); + referenceDiv = _FLD2VAL(SRSS_CLK_PLL_CONFIG_REFERENCE_DIV, SRSS->CLK_PLL_CONFIG[rootPath - 1UL]); + outputDiv = _FLD2VAL(SRSS_CLK_PLL_CONFIG_OUTPUT_DIV, SRSS->CLK_PLL_CONFIG[rootPath - 1UL]); + + pathFreqHz = ((srcFreqHz * feedbackDiv) / referenceDiv) / outputDiv; + + } + else + { + pathFreqHz = srcFreqHz; + } + } + else + { + /* Direct */ + pathFreqHz = srcFreqHz; + } + + /* Get frequency after hf_clk pre-divider */ + pathFreqHz = pathFreqHz >> _FLD2VAL(SRSS_CLK_ROOT_SELECT_ROOT_DIV, SRSS->CLK_ROOT_SELECT[0u]); + cy_Hfclk0FreqHz = pathFreqHz; + + /* Slow Clock Divider */ + slowClkDiv = 1u + _FLD2VAL(CPUSS_CM0_CLOCK_CTL_SLOW_INT_DIV, CPUSS->CM0_CLOCK_CTL); + + /* Peripheral Clock Divider */ + periClkDiv = 1u + _FLD2VAL(CPUSS_CM0_CLOCK_CTL_PERI_INT_DIV, CPUSS->CM0_CLOCK_CTL); + + pathFreqHz = pathFreqHz / periClkDiv; + cy_PeriClkFreqHz = pathFreqHz; + pathFreqHz = pathFreqHz / slowClkDiv; + SystemCoreClock = pathFreqHz; + + /* Sets clock frequency for Delay API */ + cy_delayFreqHz = SystemCoreClock; + cy_delayFreqMhz = (uint8_t)((cy_delayFreqHz + CY_DELAY_1M_MINUS_1_THRESHOLD) / CY_DELAY_1M_THRESHOLD); + cy_delayFreqKhz = (cy_delayFreqHz + CY_DELAY_1K_MINUS_1_THRESHOLD) / CY_DELAY_1K_THRESHOLD; + cy_delay32kMs = CY_DELAY_MS_OVERFLOW_THRESHOLD * cy_delayFreqKhz; +} + + +#if (CY_SYSTEM_CPU_CM0P == 1UL) || defined(CY_DOXYGEN) +/******************************************************************************* +* Function Name: Cy_SysGetCM4Status +****************************************************************************//** +* +* Returns the Cortex-M4 core power mode. +* +* \return \ref group_system_config_cm4_status_macro +* +*******************************************************************************/ +uint32_t Cy_SysGetCM4Status(void) +{ + uint32_t regValue; + + /* Get current power mode */ + regValue = CPUSS->CM4_PWR_CTL & CPUSS_CM4_PWR_CTL_PWR_MODE_Msk; + + return (regValue); +} + + +/******************************************************************************* +* Function Name: Cy_SysEnableCM4 +****************************************************************************//** +* +* Sets vector table base address and enables the Cortex-M4 core. +* +* \note If the CPU is already enabled, it is reset and then enabled. +* +* \param vectorTableOffset The offset of the vector table base address from +* memory address 0x00000000. The offset should be multiple to 1024 bytes. +* +*******************************************************************************/ +void Cy_SysEnableCM4(uint32_t vectorTableOffset) +{ + uint32_t regValue; + uint32_t interruptState; + uint32_t cpuState; + + CY_ASSERT_L2((vectorTableOffset & CY_SYS_CM4_VECTOR_TABLE_VALID_ADDR) == 0UL); + + interruptState = Cy_SysLib_EnterCriticalSection(); + + cpuState = Cy_SysGetCM4Status(); + if (CY_SYS_CM4_STATUS_ENABLED == cpuState) + { + Cy_SysResetCM4(); + } + + CPUSS->CM4_VECTOR_TABLE_BASE = vectorTableOffset; + + regValue = CPUSS->CM4_PWR_CTL & ~(CPUSS_CM4_PWR_CTL_VECTKEYSTAT_Msk | CPUSS_CM4_PWR_CTL_PWR_MODE_Msk); + regValue |= _VAL2FLD(CPUSS_CM4_PWR_CTL_VECTKEYSTAT, CY_SYS_CM4_PWR_CTL_KEY_OPEN); + regValue |= CY_SYS_CM4_STATUS_ENABLED; + CPUSS->CM4_PWR_CTL = regValue; + + while((CPUSS->CM4_STATUS & CPUSS_CM4_STATUS_PWR_DONE_Msk) == 0UL) + { + /* Wait for the power mode to take effect */ + } + + Cy_SysLib_ExitCriticalSection(interruptState); +} + + +/******************************************************************************* +* Function Name: Cy_SysDisableCM4 +****************************************************************************//** +* +* Disables the Cortex-M4 core and waits for the mode to take the effect. +* +* \warning Do not call the function while the Cortex-M4 is executing because +* such a call may corrupt/abort a pending bus-transaction by the CPU and cause +* unexpected behavior in the system including a deadlock. Call the function +* while the Cortex-M4 core is in the Sleep or Deep Sleep low-power mode. Use +* the \ref group_syspm Power Management (syspm) API to put the CPU into the +* low-power modes. Use the \ref Cy_SysPm_ReadStatus() to get a status of the +* CPU. +* +*******************************************************************************/ +void Cy_SysDisableCM4(void) +{ + uint32_t interruptState; + uint32_t regValue; + + interruptState = Cy_SysLib_EnterCriticalSection(); + + regValue = CPUSS->CM4_PWR_CTL & ~(CPUSS_CM4_PWR_CTL_VECTKEYSTAT_Msk | CPUSS_CM4_PWR_CTL_PWR_MODE_Msk); + regValue |= _VAL2FLD(CPUSS_CM4_PWR_CTL_VECTKEYSTAT, CY_SYS_CM4_PWR_CTL_KEY_OPEN); + regValue |= CY_SYS_CM4_STATUS_DISABLED; + CPUSS->CM4_PWR_CTL = regValue; + + while((CPUSS->CM4_STATUS & CPUSS_CM4_STATUS_PWR_DONE_Msk) == 0UL) + { + /* Wait for the power mode to take effect */ + } + + Cy_SysLib_ExitCriticalSection(interruptState); +} + + +/******************************************************************************* +* Function Name: Cy_SysRetainCM4 +****************************************************************************//** +* +* Retains the Cortex-M4 core and exists without waiting for the mode to take +* effect. +* +* \note The retained mode can be entered only from the enabled mode. +* +* \warning Do not call the function while the Cortex-M4 is executing because +* such a call may corrupt/abort a pending bus-transaction by the CPU and cause +* unexpected behavior in the system including a deadlock. Call the function +* while the Cortex-M4 core is in the Sleep or Deep Sleep low-power mode. Use +* the \ref group_syspm Power Management (syspm) API to put the CPU into the +* low-power modes. Use the \ref Cy_SysPm_ReadStatus() to get a status of the CPU. +* +*******************************************************************************/ +void Cy_SysRetainCM4(void) +{ + uint32_t interruptState; + uint32_t regValue; + + interruptState = Cy_SysLib_EnterCriticalSection(); + + regValue = CPUSS->CM4_PWR_CTL & ~(CPUSS_CM4_PWR_CTL_VECTKEYSTAT_Msk | CPUSS_CM4_PWR_CTL_PWR_MODE_Msk); + regValue |= _VAL2FLD(CPUSS_CM4_PWR_CTL_VECTKEYSTAT, CY_SYS_CM4_PWR_CTL_KEY_OPEN); + regValue |= CY_SYS_CM4_STATUS_RETAINED; + CPUSS->CM4_PWR_CTL = regValue; + + Cy_SysLib_ExitCriticalSection(interruptState); +} + + +/******************************************************************************* +* Function Name: Cy_SysResetCM4 +****************************************************************************//** +* +* Resets the Cortex-M4 core and waits for the mode to take the effect. +* +* \note The reset mode can not be entered from the retained mode. +* +* \warning Do not call the function while the Cortex-M4 is executing because +* such a call may corrupt/abort a pending bus-transaction by the CPU and cause +* unexpected behavior in the system including a deadlock. Call the function +* while the Cortex-M4 core is in the Sleep or Deep Sleep low-power mode. Use +* the \ref group_syspm Power Management (syspm) API to put the CPU into the +* low-power modes. Use the \ref Cy_SysPm_ReadStatus() to get a status of the CPU. +* +*******************************************************************************/ +void Cy_SysResetCM4(void) +{ + uint32_t interruptState; + uint32_t regValue; + + interruptState = Cy_SysLib_EnterCriticalSection(); + + regValue = CPUSS->CM4_PWR_CTL & ~(CPUSS_CM4_PWR_CTL_VECTKEYSTAT_Msk | CPUSS_CM4_PWR_CTL_PWR_MODE_Msk); + regValue |= _VAL2FLD(CPUSS_CM4_PWR_CTL_VECTKEYSTAT, CY_SYS_CM4_PWR_CTL_KEY_OPEN); + regValue |= CY_SYS_CM4_STATUS_RESET; + CPUSS->CM4_PWR_CTL = regValue; + + while((CPUSS->CM4_STATUS & CPUSS_CM4_STATUS_PWR_DONE_Msk) == 0UL) + { + /* Wait for the power mode to take effect */ + } + + Cy_SysLib_ExitCriticalSection(interruptState); +} +#endif /* #if (CY_SYSTEM_CPU_CM0P == 1UL) || defined(CY_DOXYGEN) */ + +#if !defined(CY_IPC_DEFAULT_CFG_DISABLE) +/******************************************************************************* +* Function Name: Cy_SysIpcPipeIsrCm0 +****************************************************************************//** +* +* This is the interrupt service routine for the system pipe. +* +*******************************************************************************/ +void Cy_SysIpcPipeIsrCm0(void) +{ + Cy_IPC_Pipe_ExecuteCallback(CY_IPC_EP_CYPIPE_CM0_ADDR); +} +#endif + + +/******************************************************************************* +* Function Name: Cy_MemorySymbols +****************************************************************************//** +* +* The intention of the function is to declare boundaries of the memories for the +* MDK compilers. For the rest of the supported compilers, this is done using +* linker configuration files. The following symbols used by the cymcuelftool. +* +*******************************************************************************/ +#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION < 6010050) +__asm void Cy_MemorySymbols(void) +{ + /* Flash */ + EXPORT __cy_memory_0_start + EXPORT __cy_memory_0_length + EXPORT __cy_memory_0_row_size + + /* Working Flash */ + EXPORT __cy_memory_1_start + EXPORT __cy_memory_1_length + EXPORT __cy_memory_1_row_size + + /* Supervisory Flash */ + EXPORT __cy_memory_2_start + EXPORT __cy_memory_2_length + EXPORT __cy_memory_2_row_size + + /* XIP */ + EXPORT __cy_memory_3_start + EXPORT __cy_memory_3_length + EXPORT __cy_memory_3_row_size + + /* eFuse */ + EXPORT __cy_memory_4_start + EXPORT __cy_memory_4_length + EXPORT __cy_memory_4_row_size + + /* Flash */ +__cy_memory_0_start EQU __cpp(CY_FLASH_BASE) +__cy_memory_0_length EQU __cpp(CY_FLASH_SIZE) +__cy_memory_0_row_size EQU 0x200 + + /* Flash region for EEPROM emulation */ +__cy_memory_1_start EQU __cpp(CY_EM_EEPROM_BASE) +__cy_memory_1_length EQU __cpp(CY_EM_EEPROM_SIZE) +__cy_memory_1_row_size EQU 0x200 + + /* Supervisory Flash */ +__cy_memory_2_start EQU __cpp(CY_SFLASH_BASE) +__cy_memory_2_length EQU __cpp(CY_SFLASH_SIZE) +__cy_memory_2_row_size EQU 0x200 + + /* XIP */ +__cy_memory_3_start EQU __cpp(CY_XIP_BASE) +__cy_memory_3_length EQU __cpp(CY_XIP_SIZE) +__cy_memory_3_row_size EQU 0x200 + + /* eFuse */ +__cy_memory_4_start EQU __cpp(0x90700000) +__cy_memory_4_length EQU __cpp(0x100000) +__cy_memory_4_row_size EQU __cpp(1) +} +#endif /* defined (__ARMCC_VERSION) && (__ARMCC_VERSION < 6010050) */ + + +/* [] END OF FILE */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM4/TOOLCHAIN_ARM/cy8c6xx7_cm4_dual.sct b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM4/TOOLCHAIN_ARM/cy8c6xx7_cm4_dual.sct new file mode 100644 index 00000000000..7ccd6c547dc --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM4/TOOLCHAIN_ARM/cy8c6xx7_cm4_dual.sct @@ -0,0 +1,313 @@ +#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m4 +; The first line specifies a preprocessor command that the linker invokes +; to pass a scatter file through a C preprocessor. + +;******************************************************************************* +;* \file cy8c6xx7_cm4_dual.sct +;* \version 2.60 +;* +;* Linker file for the ARMCC. +;* +;* The main purpose of the linker script is to describe how the sections in the +;* input files should be mapped into the output file, and to control the memory +;* layout of the output file. +;* +;* \note The entry point location is fixed and starts at 0x10000000. The valid +;* application image should be placed there. +;* +;* \note The linker files included with the PDL template projects must be +;* generic and handle all common use cases. Your project may not use every +;* section defined in the linker files. In that case you may see the warnings +;* during the build process: L6314W (no section matches pattern) and/or L6329W +;* (pattern only matches removed unused sections). In your project, you can +;* suppress the warning by passing the "--diag_suppress=L6314W,L6329W" option to +;* the linker, simply comment out or remove the relevant code in the linker +;* file. +;* +;******************************************************************************* +;* \copyright +;* Copyright 2016-2019 Cypress Semiconductor Corporation +;* SPDX-License-Identifier: Apache-2.0 +;* +;* Licensed under the Apache License, Version 2.0 (the "License"); +;* you may not use this file except in compliance with the License. +;* You may obtain a copy of the License at +;* +;* http://www.apache.org/licenses/LICENSE-2.0 +;* +;* Unless required by applicable law or agreed to in writing, software +;* distributed under the License is distributed on an "AS IS" BASIS, +;* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +;* See the License for the specific language governing permissions and +;* limitations under the License. +;******************************************************************************/ + +; Size of the Cortex-M0+ application flash image +#define FLASH_CM0P_SIZE 0x2000 + +#if !defined(MBED_ROM_START) + #define MBED_ROM_START 0x10000000 +#endif + +;* MBED_APP_START is being used by the bootloader build script and +;* will be calculate by the system. In case if MBED_APP_START address is +;* customized by the bootloader config, the application image should not +;* include CM0p prebuilt image. +;* + +#if !defined(MBED_APP_START) + #define MBED_APP_START (MBED_ROM_START + FLASH_CM0P_SIZE) +#endif + +#if !defined(MBED_ROM_SIZE) + #define MBED_ROM_SIZE 0x00100000 +#endif + +;* MBED_APP_SIZE is being used by the bootloader build script and +;* will be calculate by the system. +;* +#if !defined(MBED_APP_SIZE) + #define MBED_APP_SIZE (MBED_ROM_SIZE - FLASH_CM0P_SIZE) +#endif + +#if !defined(MBED_RAM_START) + #define MBED_RAM_START 0x08002000 +#endif + +#if !defined(MBED_RAM_SIZE) + #define MBED_RAM_SIZE 0x00045800 +#endif + +#if !defined(MBED_BOOT_STACK_SIZE) + #define MBED_BOOT_STACK_SIZE 0x400 +#endif + +; Size of the stack section at the end of CM4 SRAM +#define STACK_SIZE MBED_BOOT_STACK_SIZE + +; The defines below describe the location and size of blocks of memory in the target. +; Use these defines to specify the memory regions available for allocation. + +; The following defines control RAM and flash memory allocation for the CM4 core. +; You can change the memory allocation by editing RAM and Flash defines. +; Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use. +; Using this memory region for other purposes will lead to unexpected behavior. +; Your changes must be aligned with the corresponding defines for CM0+ core in 'xx_cm0plus.scat', +; where 'xx' is the device group; for example, 'cy8c6xx7_cm0plus.scat'. +; RAM +#define RAM_START MBED_RAM_START +#define RAM_SIZE MBED_RAM_SIZE +; Flash +#define FLASH_START MBED_APP_START +#define FLASH_SIZE MBED_APP_SIZE + +; The following defines describe a 32K flash region used for EEPROM emulation. +; This region can also be used as the general purpose flash. +; You can assign sections to this memory region for only one of the cores. +; Note some middleware (e.g. BLE, Emulated EEPROM) can place their data into this memory region. +; Therefore, repurposing this memory region will prevent such middleware from operation. +#define EM_EEPROM_START 0x14000000 +#define EM_EEPROM_SIZE 0x8000 + +; The following defines describe device specific memory regions and must not be changed. +; Supervisory flash: User data +#define SFLASH_USER_DATA_START 0x16000800 +#define SFLASH_USER_DATA_SIZE 0x00000800 + +; Supervisory flash: Normal Access Restrictions (NAR) +#define SFLASH_NAR_START 0x16001A00 +#define SFLASH_NAR_SIZE 0x00000200 + +; Supervisory flash: Public Key +#define SFLASH_PUBLIC_KEY_START 0x16005A00 +#define SFLASH_PUBLIC_KEY_SIZE 0x00000C00 + +; Supervisory flash: Table of Content # 2 +#define SFLASH_TOC_2_START 0x16007C00 +#define SFLASH_TOC_2_SIZE 0x00000200 + +; Supervisory flash: Table of Content # 2 Copy +#define SFLASH_RTOC_2_START 0x16007E00 +#define SFLASH_RTOC_2_SIZE 0x00000200 + +; External memory +#define XIP_START 0x18000000 +#define XIP_SIZE 0x08000000 + +; eFuse +#define EFUSE_START 0x90700000 +#define EFUSE_SIZE 0x100000 + + +; Cortex-M0+ application flash image area +LR_IROM MBED_ROM_START FLASH_CM0P_SIZE +{ + .cy_m0p_image +0 FLASH_CM0P_SIZE + { + * (.cy_m0p_image) + } +} + +; Cortex-M4 application flash area +LR_IROM1 FLASH_START FLASH_SIZE +{ + ER_FLASH_VECTORS +0 + { + * (RESET, +FIRST) + } + + ER_FLASH_CODE +0 FIXED + { + * (InRoot$$Sections) + * (+RO) + } + + ER_RAM_VECTORS RAM_START UNINIT + { + * (RESET_RAM, +FIRST) + } + + RW_RAM_DATA +0 + { + * (.cy_ramfunc) + * (+RW, +ZI) + } + + ; Place variables in the section that should not be initialized during the + ; device startup. + RW_IRAM1 +0 UNINIT + { + * (.noinit) + } + + ; Application heap area (HEAP) + ARM_LIB_HEAP +0 + { + * (HEAP) + } + + ; Stack region growing down + ARM_LIB_STACK RAM_START+RAM_SIZE -STACK_SIZE + { + * (STACK) + } + + ; Used for the digital signature of the secure application and the + ; Bootloader SDK application. The size of the section depends on the required + ; data size. + .cy_app_signature (MBED_ROM_START + MBED_ROM_SIZE - 256) 256 + { + * (.cy_app_signature) + } +} + + +; Emulated EEPROM Flash area +LR_EM_EEPROM EM_EEPROM_START EM_EEPROM_SIZE +{ + .cy_em_eeprom +0 + { + * (.cy_em_eeprom) + } +} + +; Supervisory flash: User data +LR_SFLASH_USER_DATA SFLASH_USER_DATA_START SFLASH_USER_DATA_SIZE +{ + .cy_sflash_user_data +0 + { + * (.cy_sflash_user_data) + } +} + +; Supervisory flash: Normal Access Restrictions (NAR) +LR_SFLASH_NAR SFLASH_NAR_START SFLASH_NAR_SIZE +{ + .cy_sflash_nar +0 + { + * (.cy_sflash_nar) + } +} + +; Supervisory flash: Public Key +LR_SFLASH_PUBLIC_KEY SFLASH_PUBLIC_KEY_START SFLASH_PUBLIC_KEY_SIZE +{ + .cy_sflash_public_key +0 + { + * (.cy_sflash_public_key) + } +} + +; Supervisory flash: Table of Content # 2 +LR_SFLASH_TOC_2 SFLASH_TOC_2_START SFLASH_TOC_2_SIZE +{ + .cy_toc_part2 +0 + { + * (.cy_toc_part2) + } +} + +; Supervisory flash: Table of Content # 2 Copy +LR_SFLASH_RTOC_2 SFLASH_RTOC_2_START SFLASH_RTOC_2_SIZE +{ + .cy_rtoc_part2 +0 + { + * (.cy_rtoc_part2) + } +} + + +; Places the code in the Execute in Place (XIP) section. See the smif driver documentation for details. +LR_EROM XIP_START XIP_SIZE +{ + .cy_xip +0 + { + * (.cy_xip) + } +} + + +; eFuse +LR_EFUSE EFUSE_START EFUSE_SIZE +{ + .cy_efuse +0 + { + * (.cy_efuse) + } +} + + +; The section is used for additional metadata (silicon revision, Silicon/JTAG ID, etc.) storage. +CYMETA 0x90500000 +{ + .cymeta +0 { * (.cymeta) } +} + +/* The following symbols used by the cymcuelftool. */ +/* Flash */ +#define __cy_memory_0_start 0x10000000 +#define __cy_memory_0_length 0x00100000 +#define __cy_memory_0_row_size 0x200 + +/* Emulated EEPROM Flash area */ +#define __cy_memory_1_start 0x14000000 +#define __cy_memory_1_length 0x8000 +#define __cy_memory_1_row_size 0x200 + +/* Supervisory Flash */ +#define __cy_memory_2_start 0x16000000 +#define __cy_memory_2_length 0x8000 +#define __cy_memory_2_row_size 0x200 + +/* XIP */ +#define __cy_memory_3_start 0x18000000 +#define __cy_memory_3_length 0x08000000 +#define __cy_memory_3_row_size 0x200 + +/* eFuse */ +#define __cy_memory_4_start 0x90700000 +#define __cy_memory_4_length 0x100000 +#define __cy_memory_4_row_size 1 + + +/* [] END OF FILE */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM4/TOOLCHAIN_ARM/startup_psoc6_01_cm4.S b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM4/TOOLCHAIN_ARM/startup_psoc6_01_cm4.S new file mode 100644 index 00000000000..5bd22714385 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM4/TOOLCHAIN_ARM/startup_psoc6_01_cm4.S @@ -0,0 +1,684 @@ +;/**************************************************************************//** +; * @file startup_psoc6_01_cm4.S +; * @brief CMSIS Core Device Startup File for +; * ARMCM4 Device Series +; * @version V5.00 +; * @date 02. March 2016 +; ******************************************************************************/ +;/* +; * Copyright (c) 2009-2016 ARM Limited. All rights reserved. +; * +; * SPDX-License-Identifier: Apache-2.0 +; * +; * Licensed under the Apache License, Version 2.0 (the License); you may +; * not use this file except in compliance with the License. +; * You may obtain a copy of the License at +; * +; * www.apache.org/licenses/LICENSE-2.0 +; * +; * Unless required by applicable law or agreed to in writing, software +; * distributed under the License is distributed on an AS IS BASIS, WITHOUT +; * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +; * See the License for the specific language governing permissions and +; * limitations under the License. +; */ + +;/* +;//-------- <<< Use Configuration Wizard in Context Menu >>> ------------------ +;*/ + +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + IF :DEF:__STACK_SIZE +Stack_Size EQU __STACK_SIZE + ELSE +Stack_Size EQU 0x00000400 + ENDIF + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + IF :DEF:__HEAP_SIZE +Heap_Size EQU __HEAP_SIZE + ELSE +Heap_Size EQU 0x00000400 + ENDIF + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + + PRESERVE8 + THUMB + +; Vector Table Mapped to Address 0 at Reset + + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + + DCD 0x0000000D ; NMI Handler located at ROM code + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External interrupts Description + DCD ioss_interrupts_gpio_0_IRQHandler ; GPIO Port Interrupt #0 + DCD ioss_interrupts_gpio_1_IRQHandler ; GPIO Port Interrupt #1 + DCD ioss_interrupts_gpio_2_IRQHandler ; GPIO Port Interrupt #2 + DCD ioss_interrupts_gpio_3_IRQHandler ; GPIO Port Interrupt #3 + DCD ioss_interrupts_gpio_4_IRQHandler ; GPIO Port Interrupt #4 + DCD ioss_interrupts_gpio_5_IRQHandler ; GPIO Port Interrupt #5 + DCD ioss_interrupts_gpio_6_IRQHandler ; GPIO Port Interrupt #6 + DCD ioss_interrupts_gpio_7_IRQHandler ; GPIO Port Interrupt #7 + DCD ioss_interrupts_gpio_8_IRQHandler ; GPIO Port Interrupt #8 + DCD ioss_interrupts_gpio_9_IRQHandler ; GPIO Port Interrupt #9 + DCD ioss_interrupts_gpio_10_IRQHandler ; GPIO Port Interrupt #10 + DCD ioss_interrupts_gpio_11_IRQHandler ; GPIO Port Interrupt #11 + DCD ioss_interrupts_gpio_12_IRQHandler ; GPIO Port Interrupt #12 + DCD ioss_interrupts_gpio_13_IRQHandler ; GPIO Port Interrupt #13 + DCD ioss_interrupts_gpio_14_IRQHandler ; GPIO Port Interrupt #14 + DCD ioss_interrupt_gpio_IRQHandler ; GPIO All Ports + DCD ioss_interrupt_vdd_IRQHandler ; GPIO Supply Detect Interrupt + DCD lpcomp_interrupt_IRQHandler ; Low Power Comparator Interrupt + DCD scb_8_interrupt_IRQHandler ; Serial Communication Block #8 (DeepSleep capable) + DCD srss_interrupt_mcwdt_0_IRQHandler ; Multi Counter Watchdog Timer interrupt + DCD srss_interrupt_mcwdt_1_IRQHandler ; Multi Counter Watchdog Timer interrupt + DCD srss_interrupt_backup_IRQHandler ; Backup domain interrupt + DCD srss_interrupt_IRQHandler ; Other combined Interrupts for SRSS (LVD, WDT, CLKCAL) + DCD pass_interrupt_ctbs_IRQHandler ; CTBm Interrupt (all CTBms) + DCD bless_interrupt_IRQHandler ; Bluetooth Radio interrupt + DCD cpuss_interrupts_ipc_0_IRQHandler ; CPUSS Inter Process Communication Interrupt #0 + DCD cpuss_interrupts_ipc_1_IRQHandler ; CPUSS Inter Process Communication Interrupt #1 + DCD cpuss_interrupts_ipc_2_IRQHandler ; CPUSS Inter Process Communication Interrupt #2 + DCD cpuss_interrupts_ipc_3_IRQHandler ; CPUSS Inter Process Communication Interrupt #3 + DCD cpuss_interrupts_ipc_4_IRQHandler ; CPUSS Inter Process Communication Interrupt #4 + DCD cpuss_interrupts_ipc_5_IRQHandler ; CPUSS Inter Process Communication Interrupt #5 + DCD cpuss_interrupts_ipc_6_IRQHandler ; CPUSS Inter Process Communication Interrupt #6 + DCD cpuss_interrupts_ipc_7_IRQHandler ; CPUSS Inter Process Communication Interrupt #7 + DCD cpuss_interrupts_ipc_8_IRQHandler ; CPUSS Inter Process Communication Interrupt #8 + DCD cpuss_interrupts_ipc_9_IRQHandler ; CPUSS Inter Process Communication Interrupt #9 + DCD cpuss_interrupts_ipc_10_IRQHandler ; CPUSS Inter Process Communication Interrupt #10 + DCD cpuss_interrupts_ipc_11_IRQHandler ; CPUSS Inter Process Communication Interrupt #11 + DCD cpuss_interrupts_ipc_12_IRQHandler ; CPUSS Inter Process Communication Interrupt #12 + DCD cpuss_interrupts_ipc_13_IRQHandler ; CPUSS Inter Process Communication Interrupt #13 + DCD cpuss_interrupts_ipc_14_IRQHandler ; CPUSS Inter Process Communication Interrupt #14 + DCD cpuss_interrupts_ipc_15_IRQHandler ; CPUSS Inter Process Communication Interrupt #15 + DCD scb_0_interrupt_IRQHandler ; Serial Communication Block #0 + DCD scb_1_interrupt_IRQHandler ; Serial Communication Block #1 + DCD scb_2_interrupt_IRQHandler ; Serial Communication Block #2 + DCD scb_3_interrupt_IRQHandler ; Serial Communication Block #3 + DCD scb_4_interrupt_IRQHandler ; Serial Communication Block #4 + DCD scb_5_interrupt_IRQHandler ; Serial Communication Block #5 + DCD scb_6_interrupt_IRQHandler ; Serial Communication Block #6 + DCD scb_7_interrupt_IRQHandler ; Serial Communication Block #7 + DCD csd_interrupt_IRQHandler ; CSD (Capsense) interrupt + DCD cpuss_interrupts_dw0_0_IRQHandler ; CPUSS DataWire #0, Channel #0 + DCD cpuss_interrupts_dw0_1_IRQHandler ; CPUSS DataWire #0, Channel #1 + DCD cpuss_interrupts_dw0_2_IRQHandler ; CPUSS DataWire #0, Channel #2 + DCD cpuss_interrupts_dw0_3_IRQHandler ; CPUSS DataWire #0, Channel #3 + DCD cpuss_interrupts_dw0_4_IRQHandler ; CPUSS DataWire #0, Channel #4 + DCD cpuss_interrupts_dw0_5_IRQHandler ; CPUSS DataWire #0, Channel #5 + DCD cpuss_interrupts_dw0_6_IRQHandler ; CPUSS DataWire #0, Channel #6 + DCD cpuss_interrupts_dw0_7_IRQHandler ; CPUSS DataWire #0, Channel #7 + DCD cpuss_interrupts_dw0_8_IRQHandler ; CPUSS DataWire #0, Channel #8 + DCD cpuss_interrupts_dw0_9_IRQHandler ; CPUSS DataWire #0, Channel #9 + DCD cpuss_interrupts_dw0_10_IRQHandler ; CPUSS DataWire #0, Channel #10 + DCD cpuss_interrupts_dw0_11_IRQHandler ; CPUSS DataWire #0, Channel #11 + DCD cpuss_interrupts_dw0_12_IRQHandler ; CPUSS DataWire #0, Channel #12 + DCD cpuss_interrupts_dw0_13_IRQHandler ; CPUSS DataWire #0, Channel #13 + DCD cpuss_interrupts_dw0_14_IRQHandler ; CPUSS DataWire #0, Channel #14 + DCD cpuss_interrupts_dw0_15_IRQHandler ; CPUSS DataWire #0, Channel #15 + DCD cpuss_interrupts_dw1_0_IRQHandler ; CPUSS DataWire #1, Channel #0 + DCD cpuss_interrupts_dw1_1_IRQHandler ; CPUSS DataWire #1, Channel #1 + DCD cpuss_interrupts_dw1_2_IRQHandler ; CPUSS DataWire #1, Channel #2 + DCD cpuss_interrupts_dw1_3_IRQHandler ; CPUSS DataWire #1, Channel #3 + DCD cpuss_interrupts_dw1_4_IRQHandler ; CPUSS DataWire #1, Channel #4 + DCD cpuss_interrupts_dw1_5_IRQHandler ; CPUSS DataWire #1, Channel #5 + DCD cpuss_interrupts_dw1_6_IRQHandler ; CPUSS DataWire #1, Channel #6 + DCD cpuss_interrupts_dw1_7_IRQHandler ; CPUSS DataWire #1, Channel #7 + DCD cpuss_interrupts_dw1_8_IRQHandler ; CPUSS DataWire #1, Channel #8 + DCD cpuss_interrupts_dw1_9_IRQHandler ; CPUSS DataWire #1, Channel #9 + DCD cpuss_interrupts_dw1_10_IRQHandler ; CPUSS DataWire #1, Channel #10 + DCD cpuss_interrupts_dw1_11_IRQHandler ; CPUSS DataWire #1, Channel #11 + DCD cpuss_interrupts_dw1_12_IRQHandler ; CPUSS DataWire #1, Channel #12 + DCD cpuss_interrupts_dw1_13_IRQHandler ; CPUSS DataWire #1, Channel #13 + DCD cpuss_interrupts_dw1_14_IRQHandler ; CPUSS DataWire #1, Channel #14 + DCD cpuss_interrupts_dw1_15_IRQHandler ; CPUSS DataWire #1, Channel #15 + DCD cpuss_interrupts_fault_0_IRQHandler ; CPUSS Fault Structure Interrupt #0 + DCD cpuss_interrupts_fault_1_IRQHandler ; CPUSS Fault Structure Interrupt #1 + DCD cpuss_interrupt_crypto_IRQHandler ; CRYPTO Accelerator Interrupt + DCD cpuss_interrupt_fm_IRQHandler ; FLASH Macro Interrupt + DCD cpuss_interrupts_cm0_cti_0_IRQHandler ; CM0+ CTI #0 + DCD cpuss_interrupts_cm0_cti_1_IRQHandler ; CM0+ CTI #1 + DCD cpuss_interrupts_cm4_cti_0_IRQHandler ; CM4 CTI #0 + DCD cpuss_interrupts_cm4_cti_1_IRQHandler ; CM4 CTI #1 + DCD tcpwm_0_interrupts_0_IRQHandler ; TCPWM #0, Counter #0 + DCD tcpwm_0_interrupts_1_IRQHandler ; TCPWM #0, Counter #1 + DCD tcpwm_0_interrupts_2_IRQHandler ; TCPWM #0, Counter #2 + DCD tcpwm_0_interrupts_3_IRQHandler ; TCPWM #0, Counter #3 + DCD tcpwm_0_interrupts_4_IRQHandler ; TCPWM #0, Counter #4 + DCD tcpwm_0_interrupts_5_IRQHandler ; TCPWM #0, Counter #5 + DCD tcpwm_0_interrupts_6_IRQHandler ; TCPWM #0, Counter #6 + DCD tcpwm_0_interrupts_7_IRQHandler ; TCPWM #0, Counter #7 + DCD tcpwm_1_interrupts_0_IRQHandler ; TCPWM #1, Counter #0 + DCD tcpwm_1_interrupts_1_IRQHandler ; TCPWM #1, Counter #1 + DCD tcpwm_1_interrupts_2_IRQHandler ; TCPWM #1, Counter #2 + DCD tcpwm_1_interrupts_3_IRQHandler ; TCPWM #1, Counter #3 + DCD tcpwm_1_interrupts_4_IRQHandler ; TCPWM #1, Counter #4 + DCD tcpwm_1_interrupts_5_IRQHandler ; TCPWM #1, Counter #5 + DCD tcpwm_1_interrupts_6_IRQHandler ; TCPWM #1, Counter #6 + DCD tcpwm_1_interrupts_7_IRQHandler ; TCPWM #1, Counter #7 + DCD tcpwm_1_interrupts_8_IRQHandler ; TCPWM #1, Counter #8 + DCD tcpwm_1_interrupts_9_IRQHandler ; TCPWM #1, Counter #9 + DCD tcpwm_1_interrupts_10_IRQHandler ; TCPWM #1, Counter #10 + DCD tcpwm_1_interrupts_11_IRQHandler ; TCPWM #1, Counter #11 + DCD tcpwm_1_interrupts_12_IRQHandler ; TCPWM #1, Counter #12 + DCD tcpwm_1_interrupts_13_IRQHandler ; TCPWM #1, Counter #13 + DCD tcpwm_1_interrupts_14_IRQHandler ; TCPWM #1, Counter #14 + DCD tcpwm_1_interrupts_15_IRQHandler ; TCPWM #1, Counter #15 + DCD tcpwm_1_interrupts_16_IRQHandler ; TCPWM #1, Counter #16 + DCD tcpwm_1_interrupts_17_IRQHandler ; TCPWM #1, Counter #17 + DCD tcpwm_1_interrupts_18_IRQHandler ; TCPWM #1, Counter #18 + DCD tcpwm_1_interrupts_19_IRQHandler ; TCPWM #1, Counter #19 + DCD tcpwm_1_interrupts_20_IRQHandler ; TCPWM #1, Counter #20 + DCD tcpwm_1_interrupts_21_IRQHandler ; TCPWM #1, Counter #21 + DCD tcpwm_1_interrupts_22_IRQHandler ; TCPWM #1, Counter #22 + DCD tcpwm_1_interrupts_23_IRQHandler ; TCPWM #1, Counter #23 + DCD udb_interrupts_0_IRQHandler ; UDB Interrupt #0 + DCD udb_interrupts_1_IRQHandler ; UDB Interrupt #1 + DCD udb_interrupts_2_IRQHandler ; UDB Interrupt #2 + DCD udb_interrupts_3_IRQHandler ; UDB Interrupt #3 + DCD udb_interrupts_4_IRQHandler ; UDB Interrupt #4 + DCD udb_interrupts_5_IRQHandler ; UDB Interrupt #5 + DCD udb_interrupts_6_IRQHandler ; UDB Interrupt #6 + DCD udb_interrupts_7_IRQHandler ; UDB Interrupt #7 + DCD udb_interrupts_8_IRQHandler ; UDB Interrupt #8 + DCD udb_interrupts_9_IRQHandler ; UDB Interrupt #9 + DCD udb_interrupts_10_IRQHandler ; UDB Interrupt #10 + DCD udb_interrupts_11_IRQHandler ; UDB Interrupt #11 + DCD udb_interrupts_12_IRQHandler ; UDB Interrupt #12 + DCD udb_interrupts_13_IRQHandler ; UDB Interrupt #13 + DCD udb_interrupts_14_IRQHandler ; UDB Interrupt #14 + DCD udb_interrupts_15_IRQHandler ; UDB Interrupt #15 + DCD pass_interrupt_sar_IRQHandler ; SAR ADC interrupt + DCD audioss_interrupt_i2s_IRQHandler ; I2S Audio interrupt + DCD audioss_interrupt_pdm_IRQHandler ; PDM/PCM Audio interrupt + DCD profile_interrupt_IRQHandler ; Energy Profiler interrupt + DCD smif_interrupt_IRQHandler ; Serial Memory Interface interrupt + DCD usb_interrupt_hi_IRQHandler ; USB Interrupt + DCD usb_interrupt_med_IRQHandler ; USB Interrupt + DCD usb_interrupt_lo_IRQHandler ; USB Interrupt + DCD pass_interrupt_dacs_IRQHandler ; Consolidated interrrupt for all DACs + +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + EXPORT __ramVectors + AREA RESET_RAM, READWRITE, NOINIT +__ramVectors SPACE __Vectors_Size + + + AREA |.text|, CODE, READONLY + + +; Weak function for startup customization +; +; Note. The global resources are not yet initialized (for example global variables, peripherals, clocks) +; because this function is executed as the first instruction in the ResetHandler. +; The PDL is also not initialized to use the proper register offsets. +; The user of this function is responsible for initializing the PDL and resources before using them. +; +Cy_OnResetUser PROC + EXPORT Cy_OnResetUser [WEAK] + BX LR + ENDP + +; Reset Handler +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT Cy_SystemInitFpuEnable + IMPORT __main + + ; Define strong function for startup customization + BL Cy_OnResetUser + + ; Disable global interrupts + CPSID I + + ; Copy vectors from ROM to RAM + LDR r1, =__Vectors + LDR r0, =__ramVectors + LDR r2, =__Vectors_Size +Vectors_Copy + LDR r3, [r1] + STR r3, [r0] + ADDS r0, r0, #4 + ADDS r1, r1, #4 + SUBS r2, r2, #1 + CMP r2, #0 + BNE Vectors_Copy + + ; Update Vector Table Offset Register. */ + LDR r0, =__ramVectors + LDR r1, =0xE000ED08 + STR r0, [r1] + dsb 0xF + + ; Enable the FPU if used + LDR R0, =Cy_SystemInitFpuEnable + BLX R0 + + LDR R0, =__main + BLX R0 + + ; Should never get here + B . + + ENDP + +; Dummy Exception Handlers (infinite loops which can be modified) +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP + +Cy_SysLib_FaultHandler PROC + EXPORT Cy_SysLib_FaultHandler [WEAK] + B . + ENDP +HardFault_Wrapper\ + PROC + EXPORT HardFault_Wrapper [WEAK] + movs r0, #4 + mov r1, LR + tst r0, r1 + beq L_MSP + mrs r0, PSP + bl L_API_call +L_MSP + mrs r0, MSP +L_API_call + bl Cy_SysLib_FaultHandler + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B HardFault_Wrapper + ENDP +MemManage_Handler\ + PROC + EXPORT MemManage_Handler [WEAK] + B HardFault_Wrapper + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B HardFault_Wrapper + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B HardFault_Wrapper + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMon_Handler\ + PROC + EXPORT DebugMon_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + EXPORT Default_Handler [WEAK] + EXPORT ioss_interrupts_gpio_0_IRQHandler [WEAK] + EXPORT ioss_interrupts_gpio_1_IRQHandler [WEAK] + EXPORT ioss_interrupts_gpio_2_IRQHandler [WEAK] + EXPORT ioss_interrupts_gpio_3_IRQHandler [WEAK] + EXPORT ioss_interrupts_gpio_4_IRQHandler [WEAK] + EXPORT ioss_interrupts_gpio_5_IRQHandler [WEAK] + EXPORT ioss_interrupts_gpio_6_IRQHandler [WEAK] + EXPORT ioss_interrupts_gpio_7_IRQHandler [WEAK] + EXPORT ioss_interrupts_gpio_8_IRQHandler [WEAK] + EXPORT ioss_interrupts_gpio_9_IRQHandler [WEAK] + EXPORT ioss_interrupts_gpio_10_IRQHandler [WEAK] + EXPORT ioss_interrupts_gpio_11_IRQHandler [WEAK] + EXPORT ioss_interrupts_gpio_12_IRQHandler [WEAK] + EXPORT ioss_interrupts_gpio_13_IRQHandler [WEAK] + EXPORT ioss_interrupts_gpio_14_IRQHandler [WEAK] + EXPORT ioss_interrupt_gpio_IRQHandler [WEAK] + EXPORT ioss_interrupt_vdd_IRQHandler [WEAK] + EXPORT lpcomp_interrupt_IRQHandler [WEAK] + EXPORT scb_8_interrupt_IRQHandler [WEAK] + EXPORT srss_interrupt_mcwdt_0_IRQHandler [WEAK] + EXPORT srss_interrupt_mcwdt_1_IRQHandler [WEAK] + EXPORT srss_interrupt_backup_IRQHandler [WEAK] + EXPORT srss_interrupt_IRQHandler [WEAK] + EXPORT pass_interrupt_ctbs_IRQHandler [WEAK] + EXPORT bless_interrupt_IRQHandler [WEAK] + EXPORT cpuss_interrupts_ipc_0_IRQHandler [WEAK] + EXPORT cpuss_interrupts_ipc_1_IRQHandler [WEAK] + EXPORT cpuss_interrupts_ipc_2_IRQHandler [WEAK] + EXPORT cpuss_interrupts_ipc_3_IRQHandler [WEAK] + EXPORT cpuss_interrupts_ipc_4_IRQHandler [WEAK] + EXPORT cpuss_interrupts_ipc_5_IRQHandler [WEAK] + EXPORT cpuss_interrupts_ipc_6_IRQHandler [WEAK] + EXPORT cpuss_interrupts_ipc_7_IRQHandler [WEAK] + EXPORT cpuss_interrupts_ipc_8_IRQHandler [WEAK] + EXPORT cpuss_interrupts_ipc_9_IRQHandler [WEAK] + EXPORT cpuss_interrupts_ipc_10_IRQHandler [WEAK] + EXPORT cpuss_interrupts_ipc_11_IRQHandler [WEAK] + EXPORT cpuss_interrupts_ipc_12_IRQHandler [WEAK] + EXPORT cpuss_interrupts_ipc_13_IRQHandler [WEAK] + EXPORT cpuss_interrupts_ipc_14_IRQHandler [WEAK] + EXPORT cpuss_interrupts_ipc_15_IRQHandler [WEAK] + EXPORT scb_0_interrupt_IRQHandler [WEAK] + EXPORT scb_1_interrupt_IRQHandler [WEAK] + EXPORT scb_2_interrupt_IRQHandler [WEAK] + EXPORT scb_3_interrupt_IRQHandler [WEAK] + EXPORT scb_4_interrupt_IRQHandler [WEAK] + EXPORT scb_5_interrupt_IRQHandler [WEAK] + EXPORT scb_6_interrupt_IRQHandler [WEAK] + EXPORT scb_7_interrupt_IRQHandler [WEAK] + EXPORT csd_interrupt_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw0_0_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw0_1_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw0_2_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw0_3_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw0_4_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw0_5_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw0_6_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw0_7_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw0_8_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw0_9_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw0_10_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw0_11_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw0_12_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw0_13_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw0_14_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw0_15_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw1_0_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw1_1_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw1_2_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw1_3_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw1_4_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw1_5_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw1_6_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw1_7_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw1_8_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw1_9_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw1_10_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw1_11_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw1_12_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw1_13_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw1_14_IRQHandler [WEAK] + EXPORT cpuss_interrupts_dw1_15_IRQHandler [WEAK] + EXPORT cpuss_interrupts_fault_0_IRQHandler [WEAK] + EXPORT cpuss_interrupts_fault_1_IRQHandler [WEAK] + EXPORT cpuss_interrupt_crypto_IRQHandler [WEAK] + EXPORT cpuss_interrupt_fm_IRQHandler [WEAK] + EXPORT cpuss_interrupts_cm0_cti_0_IRQHandler [WEAK] + EXPORT cpuss_interrupts_cm0_cti_1_IRQHandler [WEAK] + EXPORT cpuss_interrupts_cm4_cti_0_IRQHandler [WEAK] + EXPORT cpuss_interrupts_cm4_cti_1_IRQHandler [WEAK] + EXPORT tcpwm_0_interrupts_0_IRQHandler [WEAK] + EXPORT tcpwm_0_interrupts_1_IRQHandler [WEAK] + EXPORT tcpwm_0_interrupts_2_IRQHandler [WEAK] + EXPORT tcpwm_0_interrupts_3_IRQHandler [WEAK] + EXPORT tcpwm_0_interrupts_4_IRQHandler [WEAK] + EXPORT tcpwm_0_interrupts_5_IRQHandler [WEAK] + EXPORT tcpwm_0_interrupts_6_IRQHandler [WEAK] + EXPORT tcpwm_0_interrupts_7_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_0_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_1_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_2_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_3_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_4_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_5_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_6_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_7_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_8_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_9_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_10_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_11_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_12_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_13_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_14_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_15_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_16_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_17_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_18_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_19_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_20_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_21_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_22_IRQHandler [WEAK] + EXPORT tcpwm_1_interrupts_23_IRQHandler [WEAK] + EXPORT udb_interrupts_0_IRQHandler [WEAK] + EXPORT udb_interrupts_1_IRQHandler [WEAK] + EXPORT udb_interrupts_2_IRQHandler [WEAK] + EXPORT udb_interrupts_3_IRQHandler [WEAK] + EXPORT udb_interrupts_4_IRQHandler [WEAK] + EXPORT udb_interrupts_5_IRQHandler [WEAK] + EXPORT udb_interrupts_6_IRQHandler [WEAK] + EXPORT udb_interrupts_7_IRQHandler [WEAK] + EXPORT udb_interrupts_8_IRQHandler [WEAK] + EXPORT udb_interrupts_9_IRQHandler [WEAK] + EXPORT udb_interrupts_10_IRQHandler [WEAK] + EXPORT udb_interrupts_11_IRQHandler [WEAK] + EXPORT udb_interrupts_12_IRQHandler [WEAK] + EXPORT udb_interrupts_13_IRQHandler [WEAK] + EXPORT udb_interrupts_14_IRQHandler [WEAK] + EXPORT udb_interrupts_15_IRQHandler [WEAK] + EXPORT pass_interrupt_sar_IRQHandler [WEAK] + EXPORT audioss_interrupt_i2s_IRQHandler [WEAK] + EXPORT audioss_interrupt_pdm_IRQHandler [WEAK] + EXPORT profile_interrupt_IRQHandler [WEAK] + EXPORT smif_interrupt_IRQHandler [WEAK] + EXPORT usb_interrupt_hi_IRQHandler [WEAK] + EXPORT usb_interrupt_med_IRQHandler [WEAK] + EXPORT usb_interrupt_lo_IRQHandler [WEAK] + EXPORT pass_interrupt_dacs_IRQHandler [WEAK] + +ioss_interrupts_gpio_0_IRQHandler +ioss_interrupts_gpio_1_IRQHandler +ioss_interrupts_gpio_2_IRQHandler +ioss_interrupts_gpio_3_IRQHandler +ioss_interrupts_gpio_4_IRQHandler +ioss_interrupts_gpio_5_IRQHandler +ioss_interrupts_gpio_6_IRQHandler +ioss_interrupts_gpio_7_IRQHandler +ioss_interrupts_gpio_8_IRQHandler +ioss_interrupts_gpio_9_IRQHandler +ioss_interrupts_gpio_10_IRQHandler +ioss_interrupts_gpio_11_IRQHandler +ioss_interrupts_gpio_12_IRQHandler +ioss_interrupts_gpio_13_IRQHandler +ioss_interrupts_gpio_14_IRQHandler +ioss_interrupt_gpio_IRQHandler +ioss_interrupt_vdd_IRQHandler +lpcomp_interrupt_IRQHandler +scb_8_interrupt_IRQHandler +srss_interrupt_mcwdt_0_IRQHandler +srss_interrupt_mcwdt_1_IRQHandler +srss_interrupt_backup_IRQHandler +srss_interrupt_IRQHandler +pass_interrupt_ctbs_IRQHandler +bless_interrupt_IRQHandler +cpuss_interrupts_ipc_0_IRQHandler +cpuss_interrupts_ipc_1_IRQHandler +cpuss_interrupts_ipc_2_IRQHandler +cpuss_interrupts_ipc_3_IRQHandler +cpuss_interrupts_ipc_4_IRQHandler +cpuss_interrupts_ipc_5_IRQHandler +cpuss_interrupts_ipc_6_IRQHandler +cpuss_interrupts_ipc_7_IRQHandler +cpuss_interrupts_ipc_8_IRQHandler +cpuss_interrupts_ipc_9_IRQHandler +cpuss_interrupts_ipc_10_IRQHandler +cpuss_interrupts_ipc_11_IRQHandler +cpuss_interrupts_ipc_12_IRQHandler +cpuss_interrupts_ipc_13_IRQHandler +cpuss_interrupts_ipc_14_IRQHandler +cpuss_interrupts_ipc_15_IRQHandler +scb_0_interrupt_IRQHandler +scb_1_interrupt_IRQHandler +scb_2_interrupt_IRQHandler +scb_3_interrupt_IRQHandler +scb_4_interrupt_IRQHandler +scb_5_interrupt_IRQHandler +scb_6_interrupt_IRQHandler +scb_7_interrupt_IRQHandler +csd_interrupt_IRQHandler +cpuss_interrupts_dw0_0_IRQHandler +cpuss_interrupts_dw0_1_IRQHandler +cpuss_interrupts_dw0_2_IRQHandler +cpuss_interrupts_dw0_3_IRQHandler +cpuss_interrupts_dw0_4_IRQHandler +cpuss_interrupts_dw0_5_IRQHandler +cpuss_interrupts_dw0_6_IRQHandler +cpuss_interrupts_dw0_7_IRQHandler +cpuss_interrupts_dw0_8_IRQHandler +cpuss_interrupts_dw0_9_IRQHandler +cpuss_interrupts_dw0_10_IRQHandler +cpuss_interrupts_dw0_11_IRQHandler +cpuss_interrupts_dw0_12_IRQHandler +cpuss_interrupts_dw0_13_IRQHandler +cpuss_interrupts_dw0_14_IRQHandler +cpuss_interrupts_dw0_15_IRQHandler +cpuss_interrupts_dw1_0_IRQHandler +cpuss_interrupts_dw1_1_IRQHandler +cpuss_interrupts_dw1_2_IRQHandler +cpuss_interrupts_dw1_3_IRQHandler +cpuss_interrupts_dw1_4_IRQHandler +cpuss_interrupts_dw1_5_IRQHandler +cpuss_interrupts_dw1_6_IRQHandler +cpuss_interrupts_dw1_7_IRQHandler +cpuss_interrupts_dw1_8_IRQHandler +cpuss_interrupts_dw1_9_IRQHandler +cpuss_interrupts_dw1_10_IRQHandler +cpuss_interrupts_dw1_11_IRQHandler +cpuss_interrupts_dw1_12_IRQHandler +cpuss_interrupts_dw1_13_IRQHandler +cpuss_interrupts_dw1_14_IRQHandler +cpuss_interrupts_dw1_15_IRQHandler +cpuss_interrupts_fault_0_IRQHandler +cpuss_interrupts_fault_1_IRQHandler +cpuss_interrupt_crypto_IRQHandler +cpuss_interrupt_fm_IRQHandler +cpuss_interrupts_cm0_cti_0_IRQHandler +cpuss_interrupts_cm0_cti_1_IRQHandler +cpuss_interrupts_cm4_cti_0_IRQHandler +cpuss_interrupts_cm4_cti_1_IRQHandler +tcpwm_0_interrupts_0_IRQHandler +tcpwm_0_interrupts_1_IRQHandler +tcpwm_0_interrupts_2_IRQHandler +tcpwm_0_interrupts_3_IRQHandler +tcpwm_0_interrupts_4_IRQHandler +tcpwm_0_interrupts_5_IRQHandler +tcpwm_0_interrupts_6_IRQHandler +tcpwm_0_interrupts_7_IRQHandler +tcpwm_1_interrupts_0_IRQHandler +tcpwm_1_interrupts_1_IRQHandler +tcpwm_1_interrupts_2_IRQHandler +tcpwm_1_interrupts_3_IRQHandler +tcpwm_1_interrupts_4_IRQHandler +tcpwm_1_interrupts_5_IRQHandler +tcpwm_1_interrupts_6_IRQHandler +tcpwm_1_interrupts_7_IRQHandler +tcpwm_1_interrupts_8_IRQHandler +tcpwm_1_interrupts_9_IRQHandler +tcpwm_1_interrupts_10_IRQHandler +tcpwm_1_interrupts_11_IRQHandler +tcpwm_1_interrupts_12_IRQHandler +tcpwm_1_interrupts_13_IRQHandler +tcpwm_1_interrupts_14_IRQHandler +tcpwm_1_interrupts_15_IRQHandler +tcpwm_1_interrupts_16_IRQHandler +tcpwm_1_interrupts_17_IRQHandler +tcpwm_1_interrupts_18_IRQHandler +tcpwm_1_interrupts_19_IRQHandler +tcpwm_1_interrupts_20_IRQHandler +tcpwm_1_interrupts_21_IRQHandler +tcpwm_1_interrupts_22_IRQHandler +tcpwm_1_interrupts_23_IRQHandler +udb_interrupts_0_IRQHandler +udb_interrupts_1_IRQHandler +udb_interrupts_2_IRQHandler +udb_interrupts_3_IRQHandler +udb_interrupts_4_IRQHandler +udb_interrupts_5_IRQHandler +udb_interrupts_6_IRQHandler +udb_interrupts_7_IRQHandler +udb_interrupts_8_IRQHandler +udb_interrupts_9_IRQHandler +udb_interrupts_10_IRQHandler +udb_interrupts_11_IRQHandler +udb_interrupts_12_IRQHandler +udb_interrupts_13_IRQHandler +udb_interrupts_14_IRQHandler +udb_interrupts_15_IRQHandler +pass_interrupt_sar_IRQHandler +audioss_interrupt_i2s_IRQHandler +audioss_interrupt_pdm_IRQHandler +profile_interrupt_IRQHandler +smif_interrupt_IRQHandler +usb_interrupt_hi_IRQHandler +usb_interrupt_med_IRQHandler +usb_interrupt_lo_IRQHandler +pass_interrupt_dacs_IRQHandler + + B . + ENDP + + ALIGN + + +; User Initial Stack & Heap + + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + + ALIGN + + ENDIF + + END + + +; [] END OF FILE diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM4/TOOLCHAIN_GCC_ARM/cy8c6xx7_cm4_dual.ld b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM4/TOOLCHAIN_GCC_ARM/cy8c6xx7_cm4_dual.ld new file mode 100644 index 00000000000..e7c641ea4fe --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM4/TOOLCHAIN_GCC_ARM/cy8c6xx7_cm4_dual.ld @@ -0,0 +1,461 @@ +/***************************************************************************//** +* \file cy8c6xx7_cm4_dual.ld +* \version 2.60 +* +* Linker file for the GNU C compiler. +* +* The main purpose of the linker script is to describe how the sections in the +* input files should be mapped into the output file, and to control the memory +* layout of the output file. +* +* \note The entry point location is fixed and starts at 0x10000000. The valid +* application image should be placed there. +* +* \note The linker files included with the PDL template projects must be generic +* and handle all common use cases. Your project may not use every section +* defined in the linker files. In that case you may see warnings during the +* build process. In your project, you can simply comment out or remove the +* relevant code in the linker file. +* +******************************************************************************** +* \copyright +* Copyright 2016-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*******************************************************************************/ + +OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") +SEARCH_DIR(.) +GROUP(-lgcc -lc -lnosys) +ENTRY(Reset_Handler) + +/* Size of the Cortex-M0+ application image at the start of FLASH */ +FLASH_CM0P_SIZE = 0x2000; + +#if !defined(MBED_ROM_START) + #define MBED_ROM_START 0x10000000 +#endif + +/* MBED_APP_START is being used by the bootloader build script and +* will be calculate by the system. In case if MBED_APP_START address is +* customized by the bootloader config, the application image should not +* include CM0p prebuilt image. +*/ +#if !defined(MBED_APP_START) + #define MBED_APP_START (MBED_ROM_START + FLASH_CM0P_SIZE) +#endif + +#if !defined(MBED_ROM_SIZE) + #define MBED_ROM_SIZE 0x00100000 +#endif + +/* MBED_APP_SIZE is being used by the bootloader build script and +* will be calculate by the system. +*/ +#if !defined(MBED_APP_SIZE) + #define MBED_APP_SIZE (MBED_ROM_SIZE - FLASH_CM0P_SIZE) +#endif + +#if !defined(MBED_RAM_START) + #define MBED_RAM_START 0x08002000 +#endif + +#if !defined(MBED_RAM_SIZE) + #define MBED_RAM_SIZE 0x00045800 +#endif + +#if !defined(MBED_BOOT_STACK_SIZE) + #define MBED_BOOT_STACK_SIZE 0x400 +#endif + +/* Size of the stack section at the end of CM4 SRAM */ +STACK_SIZE = MBED_BOOT_STACK_SIZE; + +/* Force symbol to be entered in the output file as an undefined symbol. Doing +* this may, for example, trigger linking of additional modules from standard +* libraries. You may list several symbols for each EXTERN, and you may use +* EXTERN multiple times. This command has the same effect as the -u command-line +* option. +*/ +EXTERN(Reset_Handler) + +/* The MEMORY section below describes the location and size of blocks of memory in the target. +* Use this section to specify the memory regions available for allocation. +*/ +MEMORY +{ + /* The ram and flash regions control RAM and flash memory allocation for the CM4 core. + * You can change the memory allocation by editing the 'ram' and 'flash' regions. + * Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use. + * Using this memory region for other purposes will lead to unexpected behavior. + * Your changes must be aligned with the corresponding memory regions for CM0+ core in 'xx_cm0plus.ld', + * where 'xx' is the device group; for example, 'cy8c6xx7_cm0plus.ld'. + */ + ram (rwx) : ORIGIN = MBED_RAM_START, LENGTH = MBED_RAM_SIZE + cm0p_image (rx) : ORIGIN = MBED_ROM_START, LENGTH = FLASH_CM0P_SIZE + flash (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE + + /* This is a 32K flash region used for EEPROM emulation. This region can also be used as the general purpose flash. + * You can assign sections to this memory region for only one of the cores. + * Note some middleware (e.g. BLE, Emulated EEPROM) can place their data into this memory region. + * Therefore, repurposing this memory region will prevent such middleware from operation. + */ + em_eeprom (rx) : ORIGIN = 0x14000000, LENGTH = 0x8000 /* 32 KB */ + + /* The following regions define device specific memory regions and must not be changed. */ + sflash_user_data (rx) : ORIGIN = 0x16000800, LENGTH = 0x800 /* Supervisory flash: User data */ + sflash_nar (rx) : ORIGIN = 0x16001A00, LENGTH = 0x200 /* Supervisory flash: Normal Access Restrictions (NAR) */ + sflash_public_key (rx) : ORIGIN = 0x16005A00, LENGTH = 0xC00 /* Supervisory flash: Public Key */ + sflash_toc_2 (rx) : ORIGIN = 0x16007C00, LENGTH = 0x200 /* Supervisory flash: Table of Content # 2 */ + sflash_rtoc_2 (rx) : ORIGIN = 0x16007E00, LENGTH = 0x200 /* Supervisory flash: Table of Content # 2 Copy */ + xip (rx) : ORIGIN = 0x18000000, LENGTH = 0x8000000 /* 128 MB */ + efuse (r) : ORIGIN = 0x90700000, LENGTH = 0x100000 /* 1 MB */ +} + +/* Library configurations */ +GROUP(libgcc.a libc.a libm.a libnosys.a) + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + * __Vectors_End + * __Vectors_Size + */ + + +SECTIONS +{ + /* Cortex-M0+ application flash image area */ + .cy_m0p_image ORIGIN(cm0p_image) : + { + . = ALIGN(4); + __cy_m0p_code_start = . ; + KEEP(*(.cy_m0p_image)) + __cy_m0p_code_end = . ; + } > cm0p_image + + /* Cortex-M4 application flash area */ + .text ORIGIN(flash) : + { + . = ALIGN(4); + __Vectors = . ; + KEEP(*(.vectors)) + . = ALIGN(4); + __Vectors_End = .; + __Vectors_Size = __Vectors_End - __Vectors; + __end__ = .; + + . = ALIGN(4); + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + /* Read-only code (constants). */ + *(.rodata .rodata.* .constdata .constdata.* .conststring .conststring.*) + + KEEP(*(.eh_frame*)) + } > flash + + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > flash + + __exidx_start = .; + + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > flash + __exidx_end = .; + + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_psoc6_01_cm4.S */ + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + + /* Copy interrupt vectors from flash to RAM */ + LONG (__Vectors) /* From */ + LONG (__ram_vectors_start__) /* To */ + LONG (__Vectors_End - __Vectors) /* Size */ + + /* Copy data section to RAM */ + LONG (__etext) /* From */ + LONG (__data_start__) /* To */ + LONG (__data_end__ - __data_start__) /* Size */ + + __copy_table_end__ = .; + } > flash + + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_psoc6_01_cm4.S */ + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + __zero_table_end__ = .; + } > flash + + __etext = . ; + + + .ramVectors (NOLOAD) : ALIGN(8) + { + __ram_vectors_start__ = .; + KEEP(*(.ram_vectors)) + __ram_vectors_end__ = .; + } > ram + + + .data __ram_vectors_end__ : AT (__etext) + { + __data_start__ = .; + + *(vtable) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(4); + + KEEP(*(.cy_ramfunc*)) + . = ALIGN(4); + + __data_end__ = .; + + } > ram + + + /* Place variables in the section that should not be initialized during the + * device startup. + */ + .noinit (NOLOAD) : ALIGN(8) + { + KEEP(*(.noinit)) + } > ram + + + /* The uninitialized global or static variables are placed in this section. + * + * The NOLOAD attribute tells linker that .bss section does not consume + * any space in the image. The NOLOAD attribute changes the .bss type to + * NOBITS, and that makes linker to A) not allocate section in memory, and + * A) put information to clear the section with all zeros during application + * loading. + * + * Without the NOLOAD attribute, the .bss section might get PROGBITS type. + * This makes linker to A) allocate zeroed section in memory, and B) copy + * this section to RAM during application loading. + */ + .bss (NOLOAD): + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > ram + + + .heap (NOLOAD): + { + __HeapBase = .; + __end__ = .; + end = __end__; + KEEP(*(.heap*)) + . = ORIGIN(ram) + LENGTH(ram) - STACK_SIZE; + __HeapLimit = .; + } > ram + + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(ram) + LENGTH(ram); + __StackLimit = __StackTop - STACK_SIZE; + PROVIDE(__stack = __StackTop); + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") + + + /* Used for the digital signature of the secure application and the Bootloader SDK application. + * The size of the section depends on the required data size. */ + .cy_app_signature ORIGIN(flash) + LENGTH(flash) - 256 : + { + KEEP(*(.cy_app_signature)) + } > flash + + + /* Emulated EEPROM Flash area */ + .cy_em_eeprom : + { + KEEP(*(.cy_em_eeprom)) + } > em_eeprom + + + /* Supervisory Flash: User data */ + .cy_sflash_user_data : + { + KEEP(*(.cy_sflash_user_data)) + } > sflash_user_data + + + /* Supervisory Flash: Normal Access Restrictions (NAR) */ + .cy_sflash_nar : + { + KEEP(*(.cy_sflash_nar)) + } > sflash_nar + + + /* Supervisory Flash: Public Key */ + .cy_sflash_public_key : + { + KEEP(*(.cy_sflash_public_key)) + } > sflash_public_key + + + /* Supervisory Flash: Table of Content # 2 */ + .cy_toc_part2 : + { + KEEP(*(.cy_toc_part2)) + } > sflash_toc_2 + + + /* Supervisory Flash: Table of Content # 2 Copy */ + .cy_rtoc_part2 : + { + KEEP(*(.cy_rtoc_part2)) + } > sflash_rtoc_2 + + + /* Places the code in the Execute in Place (XIP) section. See the smif driver + * documentation for details. + */ + .cy_xip : + { + KEEP(*(.cy_xip)) + } > xip + + + /* eFuse */ + .cy_efuse : + { + KEEP(*(.cy_efuse)) + } > efuse + + + /* These sections are used for additional metadata (silicon revision, + * Silicon/JTAG ID, etc.) storage. + */ + .cymeta 0x90500000 : { KEEP(*(.cymeta)) } :NONE +} + + +/* The following symbols used by the cymcuelftool. */ +/* Flash */ +__cy_memory_0_start = 0x10000000; +__cy_memory_0_length = 0x00100000; +__cy_memory_0_row_size = 0x200; + +/* Emulated EEPROM Flash area */ +__cy_memory_1_start = 0x14000000; +__cy_memory_1_length = 0x8000; +__cy_memory_1_row_size = 0x200; + +/* Supervisory Flash */ +__cy_memory_2_start = 0x16000000; +__cy_memory_2_length = 0x8000; +__cy_memory_2_row_size = 0x200; + +/* XIP */ +__cy_memory_3_start = 0x18000000; +__cy_memory_3_length = 0x08000000; +__cy_memory_3_row_size = 0x200; + +/* eFuse */ +__cy_memory_4_start = 0x90700000; +__cy_memory_4_length = 0x100000; +__cy_memory_4_row_size = 1; + +/* EOF */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM4/TOOLCHAIN_GCC_ARM/startup_psoc6_01_cm4.S b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM4/TOOLCHAIN_GCC_ARM/startup_psoc6_01_cm4.S new file mode 100644 index 00000000000..3c2f44d1e07 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM4/TOOLCHAIN_GCC_ARM/startup_psoc6_01_cm4.S @@ -0,0 +1,631 @@ +/**************************************************************************//** + * @file startup_psoc6_01_cm4.S + * @brief CMSIS Core Device Startup File for + * ARMCM4 Device Series + * @version V5.00 + * @date 02. March 2016 + ******************************************************************************/ +/* + * Copyright (c) 2009-2016 ARM Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + /* Address of the NMI handler */ + #define CY_NMI_HANLDER_ADDR 0x0000000D + + /* The CPU VTOR register */ + #define CY_CPU_VTOR_ADDR 0xE000ED08 + + /* Copy flash vectors and data section to RAM */ + #define __STARTUP_COPY_MULTIPLE + + /* Clear single BSS section */ + #define __STARTUP_CLEAR_BSS + + .syntax unified + .arch armv7-m + + .section .stack + .align 3 +#ifdef __STACK_SIZE + .equ Stack_Size, __STACK_SIZE +#else + .equ Stack_Size, 0x00001000 +#endif + .globl __StackTop + .globl __StackLimit +__StackLimit: + .space Stack_Size + .size __StackLimit, . - __StackLimit +__StackTop: + .size __StackTop, . - __StackTop + + .section .heap + .align 3 +#ifdef __HEAP_SIZE + .equ Heap_Size, __HEAP_SIZE +#else + .equ Heap_Size, 0x00000400 +#endif + .globl __HeapBase + .globl __HeapLimit +__HeapBase: + .if Heap_Size + .space Heap_Size + .endif + .size __HeapBase, . - __HeapBase +__HeapLimit: + .size __HeapLimit, . - __HeapLimit + + .section .vectors + .align 2 + .globl __Vectors +__Vectors: + .long __StackTop /* Top of Stack */ + .long Reset_Handler /* Reset Handler */ + .long CY_NMI_HANLDER_ADDR /* NMI Handler */ + .long HardFault_Handler /* Hard Fault Handler */ + .long MemManage_Handler /* MPU Fault Handler */ + .long BusFault_Handler /* Bus Fault Handler */ + .long UsageFault_Handler /* Usage Fault Handler */ + .long 0 /* Reserved */ + .long 0 /* Reserved */ + .long 0 /* Reserved */ + .long 0 /* Reserved */ + .long SVC_Handler /* SVCall Handler */ + .long DebugMon_Handler /* Debug Monitor Handler */ + .long 0 /* Reserved */ + .long PendSV_Handler /* PendSV Handler */ + .long SysTick_Handler /* SysTick Handler */ + + /* External interrupts Description */ + .long ioss_interrupts_gpio_0_IRQHandler /* GPIO Port Interrupt #0 */ + .long ioss_interrupts_gpio_1_IRQHandler /* GPIO Port Interrupt #1 */ + .long ioss_interrupts_gpio_2_IRQHandler /* GPIO Port Interrupt #2 */ + .long ioss_interrupts_gpio_3_IRQHandler /* GPIO Port Interrupt #3 */ + .long ioss_interrupts_gpio_4_IRQHandler /* GPIO Port Interrupt #4 */ + .long ioss_interrupts_gpio_5_IRQHandler /* GPIO Port Interrupt #5 */ + .long ioss_interrupts_gpio_6_IRQHandler /* GPIO Port Interrupt #6 */ + .long ioss_interrupts_gpio_7_IRQHandler /* GPIO Port Interrupt #7 */ + .long ioss_interrupts_gpio_8_IRQHandler /* GPIO Port Interrupt #8 */ + .long ioss_interrupts_gpio_9_IRQHandler /* GPIO Port Interrupt #9 */ + .long ioss_interrupts_gpio_10_IRQHandler /* GPIO Port Interrupt #10 */ + .long ioss_interrupts_gpio_11_IRQHandler /* GPIO Port Interrupt #11 */ + .long ioss_interrupts_gpio_12_IRQHandler /* GPIO Port Interrupt #12 */ + .long ioss_interrupts_gpio_13_IRQHandler /* GPIO Port Interrupt #13 */ + .long ioss_interrupts_gpio_14_IRQHandler /* GPIO Port Interrupt #14 */ + .long ioss_interrupt_gpio_IRQHandler /* GPIO All Ports */ + .long ioss_interrupt_vdd_IRQHandler /* GPIO Supply Detect Interrupt */ + .long lpcomp_interrupt_IRQHandler /* Low Power Comparator Interrupt */ + .long scb_8_interrupt_IRQHandler /* Serial Communication Block #8 (DeepSleep capable) */ + .long srss_interrupt_mcwdt_0_IRQHandler /* Multi Counter Watchdog Timer interrupt */ + .long srss_interrupt_mcwdt_1_IRQHandler /* Multi Counter Watchdog Timer interrupt */ + .long srss_interrupt_backup_IRQHandler /* Backup domain interrupt */ + .long srss_interrupt_IRQHandler /* Other combined Interrupts for SRSS (LVD, WDT, CLKCAL) */ + .long pass_interrupt_ctbs_IRQHandler /* CTBm Interrupt (all CTBms) */ + .long bless_interrupt_IRQHandler /* Bluetooth Radio interrupt */ + .long cpuss_interrupts_ipc_0_IRQHandler /* CPUSS Inter Process Communication Interrupt #0 */ + .long cpuss_interrupts_ipc_1_IRQHandler /* CPUSS Inter Process Communication Interrupt #1 */ + .long cpuss_interrupts_ipc_2_IRQHandler /* CPUSS Inter Process Communication Interrupt #2 */ + .long cpuss_interrupts_ipc_3_IRQHandler /* CPUSS Inter Process Communication Interrupt #3 */ + .long cpuss_interrupts_ipc_4_IRQHandler /* CPUSS Inter Process Communication Interrupt #4 */ + .long cpuss_interrupts_ipc_5_IRQHandler /* CPUSS Inter Process Communication Interrupt #5 */ + .long cpuss_interrupts_ipc_6_IRQHandler /* CPUSS Inter Process Communication Interrupt #6 */ + .long cpuss_interrupts_ipc_7_IRQHandler /* CPUSS Inter Process Communication Interrupt #7 */ + .long cpuss_interrupts_ipc_8_IRQHandler /* CPUSS Inter Process Communication Interrupt #8 */ + .long cpuss_interrupts_ipc_9_IRQHandler /* CPUSS Inter Process Communication Interrupt #9 */ + .long cpuss_interrupts_ipc_10_IRQHandler /* CPUSS Inter Process Communication Interrupt #10 */ + .long cpuss_interrupts_ipc_11_IRQHandler /* CPUSS Inter Process Communication Interrupt #11 */ + .long cpuss_interrupts_ipc_12_IRQHandler /* CPUSS Inter Process Communication Interrupt #12 */ + .long cpuss_interrupts_ipc_13_IRQHandler /* CPUSS Inter Process Communication Interrupt #13 */ + .long cpuss_interrupts_ipc_14_IRQHandler /* CPUSS Inter Process Communication Interrupt #14 */ + .long cpuss_interrupts_ipc_15_IRQHandler /* CPUSS Inter Process Communication Interrupt #15 */ + .long scb_0_interrupt_IRQHandler /* Serial Communication Block #0 */ + .long scb_1_interrupt_IRQHandler /* Serial Communication Block #1 */ + .long scb_2_interrupt_IRQHandler /* Serial Communication Block #2 */ + .long scb_3_interrupt_IRQHandler /* Serial Communication Block #3 */ + .long scb_4_interrupt_IRQHandler /* Serial Communication Block #4 */ + .long scb_5_interrupt_IRQHandler /* Serial Communication Block #5 */ + .long scb_6_interrupt_IRQHandler /* Serial Communication Block #6 */ + .long scb_7_interrupt_IRQHandler /* Serial Communication Block #7 */ + .long csd_interrupt_IRQHandler /* CSD (Capsense) interrupt */ + .long cpuss_interrupts_dw0_0_IRQHandler /* CPUSS DataWire #0, Channel #0 */ + .long cpuss_interrupts_dw0_1_IRQHandler /* CPUSS DataWire #0, Channel #1 */ + .long cpuss_interrupts_dw0_2_IRQHandler /* CPUSS DataWire #0, Channel #2 */ + .long cpuss_interrupts_dw0_3_IRQHandler /* CPUSS DataWire #0, Channel #3 */ + .long cpuss_interrupts_dw0_4_IRQHandler /* CPUSS DataWire #0, Channel #4 */ + .long cpuss_interrupts_dw0_5_IRQHandler /* CPUSS DataWire #0, Channel #5 */ + .long cpuss_interrupts_dw0_6_IRQHandler /* CPUSS DataWire #0, Channel #6 */ + .long cpuss_interrupts_dw0_7_IRQHandler /* CPUSS DataWire #0, Channel #7 */ + .long cpuss_interrupts_dw0_8_IRQHandler /* CPUSS DataWire #0, Channel #8 */ + .long cpuss_interrupts_dw0_9_IRQHandler /* CPUSS DataWire #0, Channel #9 */ + .long cpuss_interrupts_dw0_10_IRQHandler /* CPUSS DataWire #0, Channel #10 */ + .long cpuss_interrupts_dw0_11_IRQHandler /* CPUSS DataWire #0, Channel #11 */ + .long cpuss_interrupts_dw0_12_IRQHandler /* CPUSS DataWire #0, Channel #12 */ + .long cpuss_interrupts_dw0_13_IRQHandler /* CPUSS DataWire #0, Channel #13 */ + .long cpuss_interrupts_dw0_14_IRQHandler /* CPUSS DataWire #0, Channel #14 */ + .long cpuss_interrupts_dw0_15_IRQHandler /* CPUSS DataWire #0, Channel #15 */ + .long cpuss_interrupts_dw1_0_IRQHandler /* CPUSS DataWire #1, Channel #0 */ + .long cpuss_interrupts_dw1_1_IRQHandler /* CPUSS DataWire #1, Channel #1 */ + .long cpuss_interrupts_dw1_2_IRQHandler /* CPUSS DataWire #1, Channel #2 */ + .long cpuss_interrupts_dw1_3_IRQHandler /* CPUSS DataWire #1, Channel #3 */ + .long cpuss_interrupts_dw1_4_IRQHandler /* CPUSS DataWire #1, Channel #4 */ + .long cpuss_interrupts_dw1_5_IRQHandler /* CPUSS DataWire #1, Channel #5 */ + .long cpuss_interrupts_dw1_6_IRQHandler /* CPUSS DataWire #1, Channel #6 */ + .long cpuss_interrupts_dw1_7_IRQHandler /* CPUSS DataWire #1, Channel #7 */ + .long cpuss_interrupts_dw1_8_IRQHandler /* CPUSS DataWire #1, Channel #8 */ + .long cpuss_interrupts_dw1_9_IRQHandler /* CPUSS DataWire #1, Channel #9 */ + .long cpuss_interrupts_dw1_10_IRQHandler /* CPUSS DataWire #1, Channel #10 */ + .long cpuss_interrupts_dw1_11_IRQHandler /* CPUSS DataWire #1, Channel #11 */ + .long cpuss_interrupts_dw1_12_IRQHandler /* CPUSS DataWire #1, Channel #12 */ + .long cpuss_interrupts_dw1_13_IRQHandler /* CPUSS DataWire #1, Channel #13 */ + .long cpuss_interrupts_dw1_14_IRQHandler /* CPUSS DataWire #1, Channel #14 */ + .long cpuss_interrupts_dw1_15_IRQHandler /* CPUSS DataWire #1, Channel #15 */ + .long cpuss_interrupts_fault_0_IRQHandler /* CPUSS Fault Structure Interrupt #0 */ + .long cpuss_interrupts_fault_1_IRQHandler /* CPUSS Fault Structure Interrupt #1 */ + .long cpuss_interrupt_crypto_IRQHandler /* CRYPTO Accelerator Interrupt */ + .long cpuss_interrupt_fm_IRQHandler /* FLASH Macro Interrupt */ + .long cpuss_interrupts_cm0_cti_0_IRQHandler /* CM0+ CTI #0 */ + .long cpuss_interrupts_cm0_cti_1_IRQHandler /* CM0+ CTI #1 */ + .long cpuss_interrupts_cm4_cti_0_IRQHandler /* CM4 CTI #0 */ + .long cpuss_interrupts_cm4_cti_1_IRQHandler /* CM4 CTI #1 */ + .long tcpwm_0_interrupts_0_IRQHandler /* TCPWM #0, Counter #0 */ + .long tcpwm_0_interrupts_1_IRQHandler /* TCPWM #0, Counter #1 */ + .long tcpwm_0_interrupts_2_IRQHandler /* TCPWM #0, Counter #2 */ + .long tcpwm_0_interrupts_3_IRQHandler /* TCPWM #0, Counter #3 */ + .long tcpwm_0_interrupts_4_IRQHandler /* TCPWM #0, Counter #4 */ + .long tcpwm_0_interrupts_5_IRQHandler /* TCPWM #0, Counter #5 */ + .long tcpwm_0_interrupts_6_IRQHandler /* TCPWM #0, Counter #6 */ + .long tcpwm_0_interrupts_7_IRQHandler /* TCPWM #0, Counter #7 */ + .long tcpwm_1_interrupts_0_IRQHandler /* TCPWM #1, Counter #0 */ + .long tcpwm_1_interrupts_1_IRQHandler /* TCPWM #1, Counter #1 */ + .long tcpwm_1_interrupts_2_IRQHandler /* TCPWM #1, Counter #2 */ + .long tcpwm_1_interrupts_3_IRQHandler /* TCPWM #1, Counter #3 */ + .long tcpwm_1_interrupts_4_IRQHandler /* TCPWM #1, Counter #4 */ + .long tcpwm_1_interrupts_5_IRQHandler /* TCPWM #1, Counter #5 */ + .long tcpwm_1_interrupts_6_IRQHandler /* TCPWM #1, Counter #6 */ + .long tcpwm_1_interrupts_7_IRQHandler /* TCPWM #1, Counter #7 */ + .long tcpwm_1_interrupts_8_IRQHandler /* TCPWM #1, Counter #8 */ + .long tcpwm_1_interrupts_9_IRQHandler /* TCPWM #1, Counter #9 */ + .long tcpwm_1_interrupts_10_IRQHandler /* TCPWM #1, Counter #10 */ + .long tcpwm_1_interrupts_11_IRQHandler /* TCPWM #1, Counter #11 */ + .long tcpwm_1_interrupts_12_IRQHandler /* TCPWM #1, Counter #12 */ + .long tcpwm_1_interrupts_13_IRQHandler /* TCPWM #1, Counter #13 */ + .long tcpwm_1_interrupts_14_IRQHandler /* TCPWM #1, Counter #14 */ + .long tcpwm_1_interrupts_15_IRQHandler /* TCPWM #1, Counter #15 */ + .long tcpwm_1_interrupts_16_IRQHandler /* TCPWM #1, Counter #16 */ + .long tcpwm_1_interrupts_17_IRQHandler /* TCPWM #1, Counter #17 */ + .long tcpwm_1_interrupts_18_IRQHandler /* TCPWM #1, Counter #18 */ + .long tcpwm_1_interrupts_19_IRQHandler /* TCPWM #1, Counter #19 */ + .long tcpwm_1_interrupts_20_IRQHandler /* TCPWM #1, Counter #20 */ + .long tcpwm_1_interrupts_21_IRQHandler /* TCPWM #1, Counter #21 */ + .long tcpwm_1_interrupts_22_IRQHandler /* TCPWM #1, Counter #22 */ + .long tcpwm_1_interrupts_23_IRQHandler /* TCPWM #1, Counter #23 */ + .long udb_interrupts_0_IRQHandler /* UDB Interrupt #0 */ + .long udb_interrupts_1_IRQHandler /* UDB Interrupt #1 */ + .long udb_interrupts_2_IRQHandler /* UDB Interrupt #2 */ + .long udb_interrupts_3_IRQHandler /* UDB Interrupt #3 */ + .long udb_interrupts_4_IRQHandler /* UDB Interrupt #4 */ + .long udb_interrupts_5_IRQHandler /* UDB Interrupt #5 */ + .long udb_interrupts_6_IRQHandler /* UDB Interrupt #6 */ + .long udb_interrupts_7_IRQHandler /* UDB Interrupt #7 */ + .long udb_interrupts_8_IRQHandler /* UDB Interrupt #8 */ + .long udb_interrupts_9_IRQHandler /* UDB Interrupt #9 */ + .long udb_interrupts_10_IRQHandler /* UDB Interrupt #10 */ + .long udb_interrupts_11_IRQHandler /* UDB Interrupt #11 */ + .long udb_interrupts_12_IRQHandler /* UDB Interrupt #12 */ + .long udb_interrupts_13_IRQHandler /* UDB Interrupt #13 */ + .long udb_interrupts_14_IRQHandler /* UDB Interrupt #14 */ + .long udb_interrupts_15_IRQHandler /* UDB Interrupt #15 */ + .long pass_interrupt_sar_IRQHandler /* SAR ADC interrupt */ + .long audioss_interrupt_i2s_IRQHandler /* I2S Audio interrupt */ + .long audioss_interrupt_pdm_IRQHandler /* PDM/PCM Audio interrupt */ + .long profile_interrupt_IRQHandler /* Energy Profiler interrupt */ + .long smif_interrupt_IRQHandler /* Serial Memory Interface interrupt */ + .long usb_interrupt_hi_IRQHandler /* USB Interrupt */ + .long usb_interrupt_med_IRQHandler /* USB Interrupt */ + .long usb_interrupt_lo_IRQHandler /* USB Interrupt */ + .long pass_interrupt_dacs_IRQHandler /* Consolidated interrrupt for all DACs */ + + + .size __Vectors, . - __Vectors + .equ __VectorsSize, . - __Vectors + + .section .ram_vectors + .align 2 + .globl __ramVectors +__ramVectors: + .space __VectorsSize + .size __ramVectors, . - __ramVectors + + + .text + .thumb + .thumb_func + .align 2 + + /* + * Device startup customization + * + * Note. The global resources are not yet initialized (for example global variables, peripherals, clocks) + * because this function is executed as the first instruction in the ResetHandler. + * The PDL is also not initialized to use the proper register offsets. + * The user of this function is responsible for initializing the PDL and resources before using them. + */ + .weak Cy_OnResetUser + .func Cy_OnResetUser, Cy_OnResetUser + .type Cy_OnResetUser, %function + +Cy_OnResetUser: + bx lr + .size Cy_OnResetUser, . - Cy_OnResetUser + .endfunc + + /* Reset handler */ + .weak Reset_Handler + .type Reset_Handler, %function + +Reset_Handler: + bl Cy_OnResetUser + cpsid i + +/* Firstly it copies data from read only memory to RAM. There are two schemes + * to copy. One can copy more than one sections. Another can only copy + * one section. The former scheme needs more instructions and read-only + * data to implement than the latter. + * Macro __STARTUP_COPY_MULTIPLE is used to choose between two schemes. */ + +#ifdef __STARTUP_COPY_MULTIPLE +/* Multiple sections scheme. + * + * Between symbol address __copy_table_start__ and __copy_table_end__, + * there are array of triplets, each of which specify: + * offset 0: LMA of start of a section to copy from + * offset 4: VMA of start of a section to copy to + * offset 8: size of the section to copy. Must be multiply of 4 + * + * All addresses must be aligned to 4 bytes boundary. + */ + ldr r4, =__copy_table_start__ + ldr r5, =__copy_table_end__ + +.L_loop0: + cmp r4, r5 + bge .L_loop0_done + ldr r1, [r4] + ldr r2, [r4, #4] + ldr r3, [r4, #8] + +.L_loop0_0: + subs r3, #4 + ittt ge + ldrge r0, [r1, r3] + strge r0, [r2, r3] + bge .L_loop0_0 + + adds r4, #12 + b .L_loop0 + +.L_loop0_done: +#else +/* Single section scheme. + * + * The ranges of copy from/to are specified by following symbols + * __etext: LMA of start of the section to copy from. Usually end of text + * __data_start__: VMA of start of the section to copy to + * __data_end__: VMA of end of the section to copy to + * + * All addresses must be aligned to 4 bytes boundary. + */ + ldr r1, =__etext + ldr r2, =__data_start__ + ldr r3, =__data_end__ + +.L_loop1: + cmp r2, r3 + ittt lt + ldrlt r0, [r1], #4 + strlt r0, [r2], #4 + blt .L_loop1 +#endif /*__STARTUP_COPY_MULTIPLE */ + +/* This part of work usually is done in C library startup code. Otherwise, + * define this macro to enable it in this startup. + * + * There are two schemes too. One can clear multiple BSS sections. Another + * can only clear one section. The former is more size expensive than the + * latter. + * + * Define macro __STARTUP_CLEAR_BSS_MULTIPLE to choose the former. + * Otherwise define macro __STARTUP_CLEAR_BSS to choose the later. + */ +#ifdef __STARTUP_CLEAR_BSS_MULTIPLE +/* Multiple sections scheme. + * + * Between symbol address __copy_table_start__ and __copy_table_end__, + * there are array of tuples specifying: + * offset 0: Start of a BSS section + * offset 4: Size of this BSS section. Must be multiply of 4 + */ + ldr r3, =__zero_table_start__ + ldr r4, =__zero_table_end__ + +.L_loop2: + cmp r3, r4 + bge .L_loop2_done + ldr r1, [r3] + ldr r2, [r3, #4] + movs r0, 0 + +.L_loop2_0: + subs r2, #4 + itt ge + strge r0, [r1, r2] + bge .L_loop2_0 + + adds r3, #8 + b .L_loop2 +.L_loop2_done: +#elif defined (__STARTUP_CLEAR_BSS) +/* Single BSS section scheme. + * + * The BSS section is specified by following symbols + * __bss_start__: start of the BSS section. + * __bss_end__: end of the BSS section. + * + * Both addresses must be aligned to 4 bytes boundary. + */ + ldr r1, =__bss_start__ + ldr r2, =__bss_end__ + + movs r0, 0 +.L_loop3: + cmp r1, r2 + itt lt + strlt r0, [r1], #4 + blt .L_loop3 +#endif /* __STARTUP_CLEAR_BSS_MULTIPLE || __STARTUP_CLEAR_BSS */ + + /* Update Vector Table Offset Register. */ + ldr r0, =__ramVectors + ldr r1, =CY_CPU_VTOR_ADDR + str r0, [r1] + dsb 0xF + + /* Enable the FPU if used */ + bl Cy_SystemInitFpuEnable + + bl _start + + /* Should never get here */ + b . + + .pool + .size Reset_Handler, . - Reset_Handler + + .align 1 + .thumb_func + .weak Default_Handler + .type Default_Handler, %function + +Default_Handler: + b . + .size Default_Handler, . - Default_Handler + + + .weak Cy_SysLib_FaultHandler + .type Cy_SysLib_FaultHandler, %function + +Cy_SysLib_FaultHandler: + b . + .size Cy_SysLib_FaultHandler, . - Cy_SysLib_FaultHandler + .type Fault_Handler, %function + +Fault_Handler: + /* Storing LR content for Creator call stack trace */ + push {LR} + movs r0, #4 + mov r1, LR + tst r0, r1 + beq .L_MSP + mrs r0, PSP + b .L_API_call +.L_MSP: + mrs r0, MSP +.L_API_call: + /* Compensation of stack pointer address due to pushing 4 bytes of LR */ + adds r0, r0, #4 + bl Cy_SysLib_FaultHandler + b . + .size Fault_Handler, . - Fault_Handler + +.macro def_fault_Handler fault_handler_name + .weak \fault_handler_name + .set \fault_handler_name, Fault_Handler + .endm + +/* Macro to define default handlers. Default handler + * will be weak symbol and just dead loops. They can be + * overwritten by other handlers */ + .macro def_irq_handler handler_name + .weak \handler_name + .set \handler_name, Default_Handler + .endm + + def_irq_handler NMI_Handler + + def_fault_Handler HardFault_Handler + def_fault_Handler MemManage_Handler + def_fault_Handler BusFault_Handler + def_fault_Handler UsageFault_Handler + + def_irq_handler SVC_Handler + def_irq_handler DebugMon_Handler + def_irq_handler PendSV_Handler + def_irq_handler SysTick_Handler + + def_irq_handler ioss_interrupts_gpio_0_IRQHandler /* GPIO Port Interrupt #0 */ + def_irq_handler ioss_interrupts_gpio_1_IRQHandler /* GPIO Port Interrupt #1 */ + def_irq_handler ioss_interrupts_gpio_2_IRQHandler /* GPIO Port Interrupt #2 */ + def_irq_handler ioss_interrupts_gpio_3_IRQHandler /* GPIO Port Interrupt #3 */ + def_irq_handler ioss_interrupts_gpio_4_IRQHandler /* GPIO Port Interrupt #4 */ + def_irq_handler ioss_interrupts_gpio_5_IRQHandler /* GPIO Port Interrupt #5 */ + def_irq_handler ioss_interrupts_gpio_6_IRQHandler /* GPIO Port Interrupt #6 */ + def_irq_handler ioss_interrupts_gpio_7_IRQHandler /* GPIO Port Interrupt #7 */ + def_irq_handler ioss_interrupts_gpio_8_IRQHandler /* GPIO Port Interrupt #8 */ + def_irq_handler ioss_interrupts_gpio_9_IRQHandler /* GPIO Port Interrupt #9 */ + def_irq_handler ioss_interrupts_gpio_10_IRQHandler /* GPIO Port Interrupt #10 */ + def_irq_handler ioss_interrupts_gpio_11_IRQHandler /* GPIO Port Interrupt #11 */ + def_irq_handler ioss_interrupts_gpio_12_IRQHandler /* GPIO Port Interrupt #12 */ + def_irq_handler ioss_interrupts_gpio_13_IRQHandler /* GPIO Port Interrupt #13 */ + def_irq_handler ioss_interrupts_gpio_14_IRQHandler /* GPIO Port Interrupt #14 */ + def_irq_handler ioss_interrupt_gpio_IRQHandler /* GPIO All Ports */ + def_irq_handler ioss_interrupt_vdd_IRQHandler /* GPIO Supply Detect Interrupt */ + def_irq_handler lpcomp_interrupt_IRQHandler /* Low Power Comparator Interrupt */ + def_irq_handler scb_8_interrupt_IRQHandler /* Serial Communication Block #8 (DeepSleep capable) */ + def_irq_handler srss_interrupt_mcwdt_0_IRQHandler /* Multi Counter Watchdog Timer interrupt */ + def_irq_handler srss_interrupt_mcwdt_1_IRQHandler /* Multi Counter Watchdog Timer interrupt */ + def_irq_handler srss_interrupt_backup_IRQHandler /* Backup domain interrupt */ + def_irq_handler srss_interrupt_IRQHandler /* Other combined Interrupts for SRSS (LVD, WDT, CLKCAL) */ + def_irq_handler pass_interrupt_ctbs_IRQHandler /* CTBm Interrupt (all CTBms) */ + def_irq_handler bless_interrupt_IRQHandler /* Bluetooth Radio interrupt */ + def_irq_handler cpuss_interrupts_ipc_0_IRQHandler /* CPUSS Inter Process Communication Interrupt #0 */ + def_irq_handler cpuss_interrupts_ipc_1_IRQHandler /* CPUSS Inter Process Communication Interrupt #1 */ + def_irq_handler cpuss_interrupts_ipc_2_IRQHandler /* CPUSS Inter Process Communication Interrupt #2 */ + def_irq_handler cpuss_interrupts_ipc_3_IRQHandler /* CPUSS Inter Process Communication Interrupt #3 */ + def_irq_handler cpuss_interrupts_ipc_4_IRQHandler /* CPUSS Inter Process Communication Interrupt #4 */ + def_irq_handler cpuss_interrupts_ipc_5_IRQHandler /* CPUSS Inter Process Communication Interrupt #5 */ + def_irq_handler cpuss_interrupts_ipc_6_IRQHandler /* CPUSS Inter Process Communication Interrupt #6 */ + def_irq_handler cpuss_interrupts_ipc_7_IRQHandler /* CPUSS Inter Process Communication Interrupt #7 */ + def_irq_handler cpuss_interrupts_ipc_8_IRQHandler /* CPUSS Inter Process Communication Interrupt #8 */ + def_irq_handler cpuss_interrupts_ipc_9_IRQHandler /* CPUSS Inter Process Communication Interrupt #9 */ + def_irq_handler cpuss_interrupts_ipc_10_IRQHandler /* CPUSS Inter Process Communication Interrupt #10 */ + def_irq_handler cpuss_interrupts_ipc_11_IRQHandler /* CPUSS Inter Process Communication Interrupt #11 */ + def_irq_handler cpuss_interrupts_ipc_12_IRQHandler /* CPUSS Inter Process Communication Interrupt #12 */ + def_irq_handler cpuss_interrupts_ipc_13_IRQHandler /* CPUSS Inter Process Communication Interrupt #13 */ + def_irq_handler cpuss_interrupts_ipc_14_IRQHandler /* CPUSS Inter Process Communication Interrupt #14 */ + def_irq_handler cpuss_interrupts_ipc_15_IRQHandler /* CPUSS Inter Process Communication Interrupt #15 */ + def_irq_handler scb_0_interrupt_IRQHandler /* Serial Communication Block #0 */ + def_irq_handler scb_1_interrupt_IRQHandler /* Serial Communication Block #1 */ + def_irq_handler scb_2_interrupt_IRQHandler /* Serial Communication Block #2 */ + def_irq_handler scb_3_interrupt_IRQHandler /* Serial Communication Block #3 */ + def_irq_handler scb_4_interrupt_IRQHandler /* Serial Communication Block #4 */ + def_irq_handler scb_5_interrupt_IRQHandler /* Serial Communication Block #5 */ + def_irq_handler scb_6_interrupt_IRQHandler /* Serial Communication Block #6 */ + def_irq_handler scb_7_interrupt_IRQHandler /* Serial Communication Block #7 */ + def_irq_handler csd_interrupt_IRQHandler /* CSD (Capsense) interrupt */ + def_irq_handler cpuss_interrupts_dw0_0_IRQHandler /* CPUSS DataWire #0, Channel #0 */ + def_irq_handler cpuss_interrupts_dw0_1_IRQHandler /* CPUSS DataWire #0, Channel #1 */ + def_irq_handler cpuss_interrupts_dw0_2_IRQHandler /* CPUSS DataWire #0, Channel #2 */ + def_irq_handler cpuss_interrupts_dw0_3_IRQHandler /* CPUSS DataWire #0, Channel #3 */ + def_irq_handler cpuss_interrupts_dw0_4_IRQHandler /* CPUSS DataWire #0, Channel #4 */ + def_irq_handler cpuss_interrupts_dw0_5_IRQHandler /* CPUSS DataWire #0, Channel #5 */ + def_irq_handler cpuss_interrupts_dw0_6_IRQHandler /* CPUSS DataWire #0, Channel #6 */ + def_irq_handler cpuss_interrupts_dw0_7_IRQHandler /* CPUSS DataWire #0, Channel #7 */ + def_irq_handler cpuss_interrupts_dw0_8_IRQHandler /* CPUSS DataWire #0, Channel #8 */ + def_irq_handler cpuss_interrupts_dw0_9_IRQHandler /* CPUSS DataWire #0, Channel #9 */ + def_irq_handler cpuss_interrupts_dw0_10_IRQHandler /* CPUSS DataWire #0, Channel #10 */ + def_irq_handler cpuss_interrupts_dw0_11_IRQHandler /* CPUSS DataWire #0, Channel #11 */ + def_irq_handler cpuss_interrupts_dw0_12_IRQHandler /* CPUSS DataWire #0, Channel #12 */ + def_irq_handler cpuss_interrupts_dw0_13_IRQHandler /* CPUSS DataWire #0, Channel #13 */ + def_irq_handler cpuss_interrupts_dw0_14_IRQHandler /* CPUSS DataWire #0, Channel #14 */ + def_irq_handler cpuss_interrupts_dw0_15_IRQHandler /* CPUSS DataWire #0, Channel #15 */ + def_irq_handler cpuss_interrupts_dw1_0_IRQHandler /* CPUSS DataWire #1, Channel #0 */ + def_irq_handler cpuss_interrupts_dw1_1_IRQHandler /* CPUSS DataWire #1, Channel #1 */ + def_irq_handler cpuss_interrupts_dw1_2_IRQHandler /* CPUSS DataWire #1, Channel #2 */ + def_irq_handler cpuss_interrupts_dw1_3_IRQHandler /* CPUSS DataWire #1, Channel #3 */ + def_irq_handler cpuss_interrupts_dw1_4_IRQHandler /* CPUSS DataWire #1, Channel #4 */ + def_irq_handler cpuss_interrupts_dw1_5_IRQHandler /* CPUSS DataWire #1, Channel #5 */ + def_irq_handler cpuss_interrupts_dw1_6_IRQHandler /* CPUSS DataWire #1, Channel #6 */ + def_irq_handler cpuss_interrupts_dw1_7_IRQHandler /* CPUSS DataWire #1, Channel #7 */ + def_irq_handler cpuss_interrupts_dw1_8_IRQHandler /* CPUSS DataWire #1, Channel #8 */ + def_irq_handler cpuss_interrupts_dw1_9_IRQHandler /* CPUSS DataWire #1, Channel #9 */ + def_irq_handler cpuss_interrupts_dw1_10_IRQHandler /* CPUSS DataWire #1, Channel #10 */ + def_irq_handler cpuss_interrupts_dw1_11_IRQHandler /* CPUSS DataWire #1, Channel #11 */ + def_irq_handler cpuss_interrupts_dw1_12_IRQHandler /* CPUSS DataWire #1, Channel #12 */ + def_irq_handler cpuss_interrupts_dw1_13_IRQHandler /* CPUSS DataWire #1, Channel #13 */ + def_irq_handler cpuss_interrupts_dw1_14_IRQHandler /* CPUSS DataWire #1, Channel #14 */ + def_irq_handler cpuss_interrupts_dw1_15_IRQHandler /* CPUSS DataWire #1, Channel #15 */ + def_irq_handler cpuss_interrupts_fault_0_IRQHandler /* CPUSS Fault Structure Interrupt #0 */ + def_irq_handler cpuss_interrupts_fault_1_IRQHandler /* CPUSS Fault Structure Interrupt #1 */ + def_irq_handler cpuss_interrupt_crypto_IRQHandler /* CRYPTO Accelerator Interrupt */ + def_irq_handler cpuss_interrupt_fm_IRQHandler /* FLASH Macro Interrupt */ + def_irq_handler cpuss_interrupts_cm0_cti_0_IRQHandler /* CM0+ CTI #0 */ + def_irq_handler cpuss_interrupts_cm0_cti_1_IRQHandler /* CM0+ CTI #1 */ + def_irq_handler cpuss_interrupts_cm4_cti_0_IRQHandler /* CM4 CTI #0 */ + def_irq_handler cpuss_interrupts_cm4_cti_1_IRQHandler /* CM4 CTI #1 */ + def_irq_handler tcpwm_0_interrupts_0_IRQHandler /* TCPWM #0, Counter #0 */ + def_irq_handler tcpwm_0_interrupts_1_IRQHandler /* TCPWM #0, Counter #1 */ + def_irq_handler tcpwm_0_interrupts_2_IRQHandler /* TCPWM #0, Counter #2 */ + def_irq_handler tcpwm_0_interrupts_3_IRQHandler /* TCPWM #0, Counter #3 */ + def_irq_handler tcpwm_0_interrupts_4_IRQHandler /* TCPWM #0, Counter #4 */ + def_irq_handler tcpwm_0_interrupts_5_IRQHandler /* TCPWM #0, Counter #5 */ + def_irq_handler tcpwm_0_interrupts_6_IRQHandler /* TCPWM #0, Counter #6 */ + def_irq_handler tcpwm_0_interrupts_7_IRQHandler /* TCPWM #0, Counter #7 */ + def_irq_handler tcpwm_1_interrupts_0_IRQHandler /* TCPWM #1, Counter #0 */ + def_irq_handler tcpwm_1_interrupts_1_IRQHandler /* TCPWM #1, Counter #1 */ + def_irq_handler tcpwm_1_interrupts_2_IRQHandler /* TCPWM #1, Counter #2 */ + def_irq_handler tcpwm_1_interrupts_3_IRQHandler /* TCPWM #1, Counter #3 */ + def_irq_handler tcpwm_1_interrupts_4_IRQHandler /* TCPWM #1, Counter #4 */ + def_irq_handler tcpwm_1_interrupts_5_IRQHandler /* TCPWM #1, Counter #5 */ + def_irq_handler tcpwm_1_interrupts_6_IRQHandler /* TCPWM #1, Counter #6 */ + def_irq_handler tcpwm_1_interrupts_7_IRQHandler /* TCPWM #1, Counter #7 */ + def_irq_handler tcpwm_1_interrupts_8_IRQHandler /* TCPWM #1, Counter #8 */ + def_irq_handler tcpwm_1_interrupts_9_IRQHandler /* TCPWM #1, Counter #9 */ + def_irq_handler tcpwm_1_interrupts_10_IRQHandler /* TCPWM #1, Counter #10 */ + def_irq_handler tcpwm_1_interrupts_11_IRQHandler /* TCPWM #1, Counter #11 */ + def_irq_handler tcpwm_1_interrupts_12_IRQHandler /* TCPWM #1, Counter #12 */ + def_irq_handler tcpwm_1_interrupts_13_IRQHandler /* TCPWM #1, Counter #13 */ + def_irq_handler tcpwm_1_interrupts_14_IRQHandler /* TCPWM #1, Counter #14 */ + def_irq_handler tcpwm_1_interrupts_15_IRQHandler /* TCPWM #1, Counter #15 */ + def_irq_handler tcpwm_1_interrupts_16_IRQHandler /* TCPWM #1, Counter #16 */ + def_irq_handler tcpwm_1_interrupts_17_IRQHandler /* TCPWM #1, Counter #17 */ + def_irq_handler tcpwm_1_interrupts_18_IRQHandler /* TCPWM #1, Counter #18 */ + def_irq_handler tcpwm_1_interrupts_19_IRQHandler /* TCPWM #1, Counter #19 */ + def_irq_handler tcpwm_1_interrupts_20_IRQHandler /* TCPWM #1, Counter #20 */ + def_irq_handler tcpwm_1_interrupts_21_IRQHandler /* TCPWM #1, Counter #21 */ + def_irq_handler tcpwm_1_interrupts_22_IRQHandler /* TCPWM #1, Counter #22 */ + def_irq_handler tcpwm_1_interrupts_23_IRQHandler /* TCPWM #1, Counter #23 */ + def_irq_handler udb_interrupts_0_IRQHandler /* UDB Interrupt #0 */ + def_irq_handler udb_interrupts_1_IRQHandler /* UDB Interrupt #1 */ + def_irq_handler udb_interrupts_2_IRQHandler /* UDB Interrupt #2 */ + def_irq_handler udb_interrupts_3_IRQHandler /* UDB Interrupt #3 */ + def_irq_handler udb_interrupts_4_IRQHandler /* UDB Interrupt #4 */ + def_irq_handler udb_interrupts_5_IRQHandler /* UDB Interrupt #5 */ + def_irq_handler udb_interrupts_6_IRQHandler /* UDB Interrupt #6 */ + def_irq_handler udb_interrupts_7_IRQHandler /* UDB Interrupt #7 */ + def_irq_handler udb_interrupts_8_IRQHandler /* UDB Interrupt #8 */ + def_irq_handler udb_interrupts_9_IRQHandler /* UDB Interrupt #9 */ + def_irq_handler udb_interrupts_10_IRQHandler /* UDB Interrupt #10 */ + def_irq_handler udb_interrupts_11_IRQHandler /* UDB Interrupt #11 */ + def_irq_handler udb_interrupts_12_IRQHandler /* UDB Interrupt #12 */ + def_irq_handler udb_interrupts_13_IRQHandler /* UDB Interrupt #13 */ + def_irq_handler udb_interrupts_14_IRQHandler /* UDB Interrupt #14 */ + def_irq_handler udb_interrupts_15_IRQHandler /* UDB Interrupt #15 */ + def_irq_handler pass_interrupt_sar_IRQHandler /* SAR ADC interrupt */ + def_irq_handler audioss_interrupt_i2s_IRQHandler /* I2S Audio interrupt */ + def_irq_handler audioss_interrupt_pdm_IRQHandler /* PDM/PCM Audio interrupt */ + def_irq_handler profile_interrupt_IRQHandler /* Energy Profiler interrupt */ + def_irq_handler smif_interrupt_IRQHandler /* Serial Memory Interface interrupt */ + def_irq_handler usb_interrupt_hi_IRQHandler /* USB Interrupt */ + def_irq_handler usb_interrupt_med_IRQHandler /* USB Interrupt */ + def_irq_handler usb_interrupt_lo_IRQHandler /* USB Interrupt */ + def_irq_handler pass_interrupt_dacs_IRQHandler /* Consolidated interrrupt for all DACs */ + + .end + + +/* [] END OF FILE */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM4/TOOLCHAIN_IAR/cy8c6xx7_cm4_dual.icf b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM4/TOOLCHAIN_IAR/cy8c6xx7_cm4_dual.icf new file mode 100644 index 00000000000..ae61379863e --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM4/TOOLCHAIN_IAR/cy8c6xx7_cm4_dual.icf @@ -0,0 +1,286 @@ +/***************************************************************************//** +* \file cy8c6xx7_cm4_dual.icf +* \version 2.60 +* +* Linker file for the IAR compiler. +* +* The main purpose of the linker script is to describe how the sections in the +* input files should be mapped into the output file, and to control the memory +* layout of the output file. +* +* \note The entry point is fixed and starts at 0x10000000. The valid application +* image should be placed there. +* +* \note The linker files included with the PDL template projects must be generic +* and handle all common use cases. Your project may not use every section +* defined in the linker files. In that case you may see warnings during the +* build process. In your project, you can simply comment out or remove the +* relevant code in the linker file. +* +******************************************************************************** +* \copyright +* Copyright 2016-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*******************************************************************************/ + +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_4.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; + +/* Size of the Cortex-M0+ application image */ +define symbol FLASH_CM0P_SIZE = 0x2000; + +if (!isdefinedsymbol(MBED_ROM_START)) { + define symbol MBED_ROM_START = 0x10000000; +} + +/* MBED_APP_START is being used by the bootloader build script and + * will be calculate by the system. In case if MBED_APP_START address is + * customized by the bootloader config, the application image should not + * include CM0p prebuilt image. + */ +if (!isdefinedsymbol(MBED_APP_START)) { + define symbol MBED_APP_START = (MBED_ROM_START + FLASH_CM0P_SIZE); +} + +if (!isdefinedsymbol(MBED_ROM_SIZE)) { + define symbol MBED_ROM_SIZE = 0x00100000; +} + +/* MBED_APP_SIZE is being used by the bootloader build script and + * will be calculate by the system. + */ +if (!isdefinedsymbol(MBED_APP_SIZE)) { + define symbol MBED_APP_SIZE = (MBED_ROM_SIZE - FLASH_CM0P_SIZE); +} + +if (!isdefinedsymbol(MBED_RAM_START)) { + define symbol MBED_RAM_START = 0x08002000; +} + +if (!isdefinedsymbol(MBED_RAM_SIZE)) { + define symbol MBED_RAM_SIZE = 0x00045800; +} + +if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) { + + if (!isdefinedsymbol(__STACK_SIZE)) { + define symbol MBED_BOOT_STACK_SIZE = 0x0400; + } else { + define symbol MBED_BOOT_STACK_SIZE = __STACK_SIZE; + } +} + +define symbol __ICFEDIT_size_cstack__ = MBED_BOOT_STACK_SIZE; + +/* The symbols below define the location and size of blocks of memory in the target. + * Use these symbols to specify the memory regions available for allocation. + */ + +/* The following symbols control RAM and flash memory allocation for the CM4 core. + * You can change the memory allocation by editing RAM and Flash symbols. + * Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use. + * Using this memory region for other purposes will lead to unexpected behavior. + * Your changes must be aligned with the corresponding symbols for CM0+ core in 'xx_cm0plus.icf', + * where 'xx' is the device group; for example, 'cy8c6xx7_cm0plus.icf'. + */ +/* RAM */ +define symbol __ICFEDIT_region_IRAM1_start__ = MBED_RAM_START; +define symbol __ICFEDIT_region_IRAM1_end__ = (MBED_RAM_START + MBED_RAM_SIZE); +/* Flash */ +define symbol __ICFEDIT_region_IROM0_start__ = MBED_ROM_START; +define symbol __ICFEDIT_region_IROM0_end__ = (MBED_ROM_START + FLASH_CM0P_SIZE); + +define symbol __ICFEDIT_region_IROM1_start__ = MBED_APP_START; +define symbol __ICFEDIT_region_IROM1_end__ = (MBED_APP_START + MBED_APP_SIZE); + +/* The following symbols define a 32K flash region used for EEPROM emulation. + * This region can also be used as the general purpose flash. + * You can assign sections to this memory region for only one of the cores. + * Note some middleware (e.g. BLE, Emulated EEPROM) can place their data into this memory region. + * Therefore, repurposing this memory region will prevent such middleware from operation. + */ +define symbol __ICFEDIT_region_IROM2_start__ = 0x14000000; +define symbol __ICFEDIT_region_IROM2_end__ = 0x14007FFF; + +/* The following symbols define device specific memory regions and must not be changed. */ +/* Supervisory FLASH - User Data */ +define symbol __ICFEDIT_region_IROM3_start__ = 0x16000800; +define symbol __ICFEDIT_region_IROM3_end__ = 0x160007FF; + +/* Supervisory FLASH - Normal Access Restrictions (NAR) */ +define symbol __ICFEDIT_region_IROM4_start__ = 0x16001A00; +define symbol __ICFEDIT_region_IROM4_end__ = 0x16001BFF; + +/* Supervisory FLASH - Public Key */ +define symbol __ICFEDIT_region_IROM5_start__ = 0x16005A00; +define symbol __ICFEDIT_region_IROM5_end__ = 0x160065FF; + +/* Supervisory FLASH - Table of Content # 2 */ +define symbol __ICFEDIT_region_IROM6_start__ = 0x16007C00; +define symbol __ICFEDIT_region_IROM6_end__ = 0x16007DFF; + +/* Supervisory FLASH - Table of Content # 2 Copy */ +define symbol __ICFEDIT_region_IROM7_start__ = 0x16007E00; +define symbol __ICFEDIT_region_IROM7_end__ = 0x16007FFF; + +/* eFuse */ +define symbol __ICFEDIT_region_IROM8_start__ = 0x90700000; +define symbol __ICFEDIT_region_IROM8_end__ = 0x907FFFFF; + +/* XIP */ +define symbol __ICFEDIT_region_EROM1_start__ = 0x18000000; +define symbol __ICFEDIT_region_EROM1_end__ = 0x1FFFFFFF; + +define symbol __ICFEDIT_region_EROM2_start__ = 0x0; +define symbol __ICFEDIT_region_EROM2_end__ = 0x0; +define symbol __ICFEDIT_region_EROM3_start__ = 0x0; +define symbol __ICFEDIT_region_EROM3_end__ = 0x0; + + +define symbol __ICFEDIT_region_IRAM2_start__ = 0x0; +define symbol __ICFEDIT_region_IRAM2_end__ = 0x0; +define symbol __ICFEDIT_region_ERAM1_start__ = 0x0; +define symbol __ICFEDIT_region_ERAM1_end__ = 0x0; +define symbol __ICFEDIT_region_ERAM2_start__ = 0x0; +define symbol __ICFEDIT_region_ERAM2_end__ = 0x0; +define symbol __ICFEDIT_region_ERAM3_start__ = 0x0; +define symbol __ICFEDIT_region_ERAM3_end__ = 0x0; +/*-Sizes-*/ +/* Defines the minimum heap size. The actual heap size will be expanded to the end of the stack region */ +if (!isdefinedsymbol(__HEAP_SIZE)) { + define symbol __ICFEDIT_size_heap__ = 0x0400; +} else { + define symbol __ICFEDIT_size_heap__ = __HEAP_SIZE; +} +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region IROM0_region = mem:[from __ICFEDIT_region_IROM0_start__ to __ICFEDIT_region_IROM0_end__]; +define region IROM1_region = mem:[from __ICFEDIT_region_IROM1_start__ to __ICFEDIT_region_IROM1_end__]; +define region IROM2_region = mem:[from __ICFEDIT_region_IROM2_start__ to __ICFEDIT_region_IROM2_end__]; +define region IROM3_region = mem:[from __ICFEDIT_region_IROM3_start__ to __ICFEDIT_region_IROM3_end__]; +define region IROM4_region = mem:[from __ICFEDIT_region_IROM4_start__ to __ICFEDIT_region_IROM4_end__]; +define region IROM5_region = mem:[from __ICFEDIT_region_IROM5_start__ to __ICFEDIT_region_IROM5_end__]; +define region IROM6_region = mem:[from __ICFEDIT_region_IROM6_start__ to __ICFEDIT_region_IROM6_end__]; +define region IROM7_region = mem:[from __ICFEDIT_region_IROM7_start__ to __ICFEDIT_region_IROM7_end__]; +define region IROM8_region = mem:[from __ICFEDIT_region_IROM8_start__ to __ICFEDIT_region_IROM8_end__]; +define region EROM1_region = mem:[from __ICFEDIT_region_EROM1_start__ to __ICFEDIT_region_EROM1_end__]; +define region IRAM1_region = mem:[from __ICFEDIT_region_IRAM1_start__ to __ICFEDIT_region_IRAM1_end__]; + +define block RAM_DATA {readwrite section .data}; +define block RAM_OTHER {readwrite section * }; +define block RAM_NOINIT {readwrite section .noinit}; +define block RAM_BSS {readwrite section .bss}; +define block RAM with fixed order {block RAM_DATA, block RAM_OTHER, block RAM_NOINIT, block RAM_BSS}; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with expanding size, alignment = 8, minimum size = __ICFEDIT_size_heap__ { }; + +define block CM0P_RO with size = FLASH_CM0P_SIZE { readonly section .cy_m0p_image }; +define block RO {first section .intvec, readonly}; + +/*-Initializations-*/ +initialize by copy { readwrite }; +do not initialize { section .noinit, section .intvec_ram }; + +/*-Placement-*/ + +/* Flash - Cortex-M0+ application image */ +place at start of IROM0_region { block CM0P_RO }; + +/* Flash - Cortex-M4 application */ +place at start of IROM1_region { block RO }; + +/* Used for the digital signature of the secure application and the Bootloader SDK application. */ +".cy_app_signature" : place at address (__ICFEDIT_region_IROM1_end__ - 0x200) { section .cy_app_signature }; + +/* Emulated EEPROM Flash area */ +".cy_em_eeprom" : place at start of IROM2_region { section .cy_em_eeprom }; + +/* Supervisory Flash - User Data */ +".cy_sflash_user_data" : place at start of IROM3_region { section .cy_sflash_user_data }; + +/* Supervisory Flash - NAR */ +".cy_sflash_nar" : place at start of IROM4_region { section .cy_sflash_nar }; + +/* Supervisory Flash - Public Key */ +".cy_sflash_public_key" : place at start of IROM5_region { section .cy_sflash_public_key }; + +/* Supervisory Flash - TOC2 */ +".cy_toc_part2" : place at start of IROM6_region { section .cy_toc_part2 }; + +/* Supervisory Flash - RTOC2 */ +".cy_rtoc_part2" : place at start of IROM7_region { section .cy_rtoc_part2 }; + +/* eFuse */ +".cy_efuse" : place at start of IROM8_region { section .cy_efuse }; + +/* Execute in Place (XIP). See the smif driver documentation for details. */ +".cy_xip" : place at start of EROM1_region { section .cy_xip }; + +/* RAM */ +place at start of IRAM1_region { readwrite section .intvec_ram}; +place in IRAM1_region { block RAM}; +place in IRAM1_region { block HEAP}; +place at end of IRAM1_region { block CSTACK }; + +/* These sections are used for additional metadata (silicon revision, Silicon/JTAG ID, etc.) storage. */ +".cymeta" : place at address mem : 0x90500000 { readonly section .cymeta }; + + +keep { section .cy_m0p_image, + section .cy_app_signature, + section .cy_em_eeprom, + section .cy_sflash_user_data, + section .cy_sflash_nar, + section .cy_sflash_public_key, + section .cy_toc_part2, + section .cy_rtoc_part2, + section .cy_efuse, + section .cy_xip, + section .cymeta, + }; + + +/* The following symbols used by the cymcuelftool. */ +/* Flash */ +define exported symbol __cy_memory_0_start = 0x10000000; +define exported symbol __cy_memory_0_length = 0x00100000; +define exported symbol __cy_memory_0_row_size = 0x200; + +/* Emulated EEPROM Flash area */ +define exported symbol __cy_memory_1_start = 0x14000000; +define exported symbol __cy_memory_1_length = 0x8000; +define exported symbol __cy_memory_1_row_size = 0x200; + +/* Supervisory Flash */ +define exported symbol __cy_memory_2_start = 0x16000000; +define exported symbol __cy_memory_2_length = 0x8000; +define exported symbol __cy_memory_2_row_size = 0x200; + +/* XIP */ +define exported symbol __cy_memory_3_start = 0x18000000; +define exported symbol __cy_memory_3_length = 0x08000000; +define exported symbol __cy_memory_3_row_size = 0x200; + +/* eFuse */ +define exported symbol __cy_memory_4_start = 0x90700000; +define exported symbol __cy_memory_4_length = 0x100000; +define exported symbol __cy_memory_4_row_size = 1; + +/* EOF */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM4/TOOLCHAIN_IAR/startup_psoc6_01_cm4.S b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM4/TOOLCHAIN_IAR/startup_psoc6_01_cm4.S new file mode 100644 index 00000000000..f4ca47b4579 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM4/TOOLCHAIN_IAR/startup_psoc6_01_cm4.S @@ -0,0 +1,1137 @@ +;/**************************************************************************//** +; * @file startup_psoc6_01_cm4.S +; * @brief CMSIS Core Device Startup File for +; * ARMCM4 Device Series +; * @version V5.00 +; * @date 08. March 2016 +; ******************************************************************************/ +;/* +; * Copyright (c) 2009-2016 ARM Limited. All rights reserved. +; * +; * SPDX-License-Identifier: Apache-2.0 +; * +; * Licensed under the Apache License, Version 2.0 (the License); you may +; * not use this file except in compliance with the License. +; * You may obtain a copy of the License at +; * +; * www.apache.org/licenses/LICENSE-2.0 +; * +; * Unless required by applicable law or agreed to in writing, software +; * distributed under the License is distributed on an AS IS BASIS, WITHOUT +; * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +; * See the License for the specific language governing permissions and +; * limitations under the License. +; */ + +; +; The modules in this file are included in the libraries, and may be replaced +; by any user-defined modules that define the PUBLIC symbol _program_start or +; a user defined start symbol. +; To override the cstartup defined in the library, simply add your modified +; version to the workbench project. +; +; The vector table is normally located at address 0. +; When debugging in RAM, it can be located in RAM, aligned to at least 2^6. +; The name "__vector_table" has special meaning for C-SPY: +; it is where the SP start value is found, and the NVIC vector +; table register (VTOR) is initialized to this address if != 0. +; +; Cortex-M version +; + + MODULE ?cstartup + + ;; Forward declaration of sections. + SECTION CSTACK:DATA:NOROOT(3) + SECTION .intvec_ram:DATA:NOROOT(2) + SECTION .intvec:CODE:NOROOT(2) + + EXTERN __iar_program_start + EXTERN SystemInit + EXTERN Cy_SystemInitFpuEnable + EXTERN __iar_data_init3 + PUBLIC __vector_table + PUBLIC __vector_table_0x1c + PUBLIC __Vectors + PUBLIC __Vectors_End + PUBLIC __Vectors_Size + PUBLIC __ramVectors + + DATA + +__vector_table + DCD sfe(CSTACK) + DCD Reset_Handler + + DCD 0x0000000D ; NMI_Handler is defined in ROM code + DCD HardFault_Handler + DCD MemManage_Handler + DCD BusFault_Handler + DCD UsageFault_Handler +__vector_table_0x1c + DCD 0 + DCD 0 + DCD 0 + DCD 0 + DCD SVC_Handler + DCD DebugMon_Handler + DCD 0 + DCD PendSV_Handler + DCD SysTick_Handler + + ; External interrupts Description + DCD ioss_interrupts_gpio_0_IRQHandler ; GPIO Port Interrupt #0 + DCD ioss_interrupts_gpio_1_IRQHandler ; GPIO Port Interrupt #1 + DCD ioss_interrupts_gpio_2_IRQHandler ; GPIO Port Interrupt #2 + DCD ioss_interrupts_gpio_3_IRQHandler ; GPIO Port Interrupt #3 + DCD ioss_interrupts_gpio_4_IRQHandler ; GPIO Port Interrupt #4 + DCD ioss_interrupts_gpio_5_IRQHandler ; GPIO Port Interrupt #5 + DCD ioss_interrupts_gpio_6_IRQHandler ; GPIO Port Interrupt #6 + DCD ioss_interrupts_gpio_7_IRQHandler ; GPIO Port Interrupt #7 + DCD ioss_interrupts_gpio_8_IRQHandler ; GPIO Port Interrupt #8 + DCD ioss_interrupts_gpio_9_IRQHandler ; GPIO Port Interrupt #9 + DCD ioss_interrupts_gpio_10_IRQHandler ; GPIO Port Interrupt #10 + DCD ioss_interrupts_gpio_11_IRQHandler ; GPIO Port Interrupt #11 + DCD ioss_interrupts_gpio_12_IRQHandler ; GPIO Port Interrupt #12 + DCD ioss_interrupts_gpio_13_IRQHandler ; GPIO Port Interrupt #13 + DCD ioss_interrupts_gpio_14_IRQHandler ; GPIO Port Interrupt #14 + DCD ioss_interrupt_gpio_IRQHandler ; GPIO All Ports + DCD ioss_interrupt_vdd_IRQHandler ; GPIO Supply Detect Interrupt + DCD lpcomp_interrupt_IRQHandler ; Low Power Comparator Interrupt + DCD scb_8_interrupt_IRQHandler ; Serial Communication Block #8 (DeepSleep capable) + DCD srss_interrupt_mcwdt_0_IRQHandler ; Multi Counter Watchdog Timer interrupt + DCD srss_interrupt_mcwdt_1_IRQHandler ; Multi Counter Watchdog Timer interrupt + DCD srss_interrupt_backup_IRQHandler ; Backup domain interrupt + DCD srss_interrupt_IRQHandler ; Other combined Interrupts for SRSS (LVD, WDT, CLKCAL) + DCD pass_interrupt_ctbs_IRQHandler ; CTBm Interrupt (all CTBms) + DCD bless_interrupt_IRQHandler ; Bluetooth Radio interrupt + DCD cpuss_interrupts_ipc_0_IRQHandler ; CPUSS Inter Process Communication Interrupt #0 + DCD cpuss_interrupts_ipc_1_IRQHandler ; CPUSS Inter Process Communication Interrupt #1 + DCD cpuss_interrupts_ipc_2_IRQHandler ; CPUSS Inter Process Communication Interrupt #2 + DCD cpuss_interrupts_ipc_3_IRQHandler ; CPUSS Inter Process Communication Interrupt #3 + DCD cpuss_interrupts_ipc_4_IRQHandler ; CPUSS Inter Process Communication Interrupt #4 + DCD cpuss_interrupts_ipc_5_IRQHandler ; CPUSS Inter Process Communication Interrupt #5 + DCD cpuss_interrupts_ipc_6_IRQHandler ; CPUSS Inter Process Communication Interrupt #6 + DCD cpuss_interrupts_ipc_7_IRQHandler ; CPUSS Inter Process Communication Interrupt #7 + DCD cpuss_interrupts_ipc_8_IRQHandler ; CPUSS Inter Process Communication Interrupt #8 + DCD cpuss_interrupts_ipc_9_IRQHandler ; CPUSS Inter Process Communication Interrupt #9 + DCD cpuss_interrupts_ipc_10_IRQHandler ; CPUSS Inter Process Communication Interrupt #10 + DCD cpuss_interrupts_ipc_11_IRQHandler ; CPUSS Inter Process Communication Interrupt #11 + DCD cpuss_interrupts_ipc_12_IRQHandler ; CPUSS Inter Process Communication Interrupt #12 + DCD cpuss_interrupts_ipc_13_IRQHandler ; CPUSS Inter Process Communication Interrupt #13 + DCD cpuss_interrupts_ipc_14_IRQHandler ; CPUSS Inter Process Communication Interrupt #14 + DCD cpuss_interrupts_ipc_15_IRQHandler ; CPUSS Inter Process Communication Interrupt #15 + DCD scb_0_interrupt_IRQHandler ; Serial Communication Block #0 + DCD scb_1_interrupt_IRQHandler ; Serial Communication Block #1 + DCD scb_2_interrupt_IRQHandler ; Serial Communication Block #2 + DCD scb_3_interrupt_IRQHandler ; Serial Communication Block #3 + DCD scb_4_interrupt_IRQHandler ; Serial Communication Block #4 + DCD scb_5_interrupt_IRQHandler ; Serial Communication Block #5 + DCD scb_6_interrupt_IRQHandler ; Serial Communication Block #6 + DCD scb_7_interrupt_IRQHandler ; Serial Communication Block #7 + DCD csd_interrupt_IRQHandler ; CSD (Capsense) interrupt + DCD cpuss_interrupts_dw0_0_IRQHandler ; CPUSS DataWire #0, Channel #0 + DCD cpuss_interrupts_dw0_1_IRQHandler ; CPUSS DataWire #0, Channel #1 + DCD cpuss_interrupts_dw0_2_IRQHandler ; CPUSS DataWire #0, Channel #2 + DCD cpuss_interrupts_dw0_3_IRQHandler ; CPUSS DataWire #0, Channel #3 + DCD cpuss_interrupts_dw0_4_IRQHandler ; CPUSS DataWire #0, Channel #4 + DCD cpuss_interrupts_dw0_5_IRQHandler ; CPUSS DataWire #0, Channel #5 + DCD cpuss_interrupts_dw0_6_IRQHandler ; CPUSS DataWire #0, Channel #6 + DCD cpuss_interrupts_dw0_7_IRQHandler ; CPUSS DataWire #0, Channel #7 + DCD cpuss_interrupts_dw0_8_IRQHandler ; CPUSS DataWire #0, Channel #8 + DCD cpuss_interrupts_dw0_9_IRQHandler ; CPUSS DataWire #0, Channel #9 + DCD cpuss_interrupts_dw0_10_IRQHandler ; CPUSS DataWire #0, Channel #10 + DCD cpuss_interrupts_dw0_11_IRQHandler ; CPUSS DataWire #0, Channel #11 + DCD cpuss_interrupts_dw0_12_IRQHandler ; CPUSS DataWire #0, Channel #12 + DCD cpuss_interrupts_dw0_13_IRQHandler ; CPUSS DataWire #0, Channel #13 + DCD cpuss_interrupts_dw0_14_IRQHandler ; CPUSS DataWire #0, Channel #14 + DCD cpuss_interrupts_dw0_15_IRQHandler ; CPUSS DataWire #0, Channel #15 + DCD cpuss_interrupts_dw1_0_IRQHandler ; CPUSS DataWire #1, Channel #0 + DCD cpuss_interrupts_dw1_1_IRQHandler ; CPUSS DataWire #1, Channel #1 + DCD cpuss_interrupts_dw1_2_IRQHandler ; CPUSS DataWire #1, Channel #2 + DCD cpuss_interrupts_dw1_3_IRQHandler ; CPUSS DataWire #1, Channel #3 + DCD cpuss_interrupts_dw1_4_IRQHandler ; CPUSS DataWire #1, Channel #4 + DCD cpuss_interrupts_dw1_5_IRQHandler ; CPUSS DataWire #1, Channel #5 + DCD cpuss_interrupts_dw1_6_IRQHandler ; CPUSS DataWire #1, Channel #6 + DCD cpuss_interrupts_dw1_7_IRQHandler ; CPUSS DataWire #1, Channel #7 + DCD cpuss_interrupts_dw1_8_IRQHandler ; CPUSS DataWire #1, Channel #8 + DCD cpuss_interrupts_dw1_9_IRQHandler ; CPUSS DataWire #1, Channel #9 + DCD cpuss_interrupts_dw1_10_IRQHandler ; CPUSS DataWire #1, Channel #10 + DCD cpuss_interrupts_dw1_11_IRQHandler ; CPUSS DataWire #1, Channel #11 + DCD cpuss_interrupts_dw1_12_IRQHandler ; CPUSS DataWire #1, Channel #12 + DCD cpuss_interrupts_dw1_13_IRQHandler ; CPUSS DataWire #1, Channel #13 + DCD cpuss_interrupts_dw1_14_IRQHandler ; CPUSS DataWire #1, Channel #14 + DCD cpuss_interrupts_dw1_15_IRQHandler ; CPUSS DataWire #1, Channel #15 + DCD cpuss_interrupts_fault_0_IRQHandler ; CPUSS Fault Structure Interrupt #0 + DCD cpuss_interrupts_fault_1_IRQHandler ; CPUSS Fault Structure Interrupt #1 + DCD cpuss_interrupt_crypto_IRQHandler ; CRYPTO Accelerator Interrupt + DCD cpuss_interrupt_fm_IRQHandler ; FLASH Macro Interrupt + DCD cpuss_interrupts_cm0_cti_0_IRQHandler ; CM0+ CTI #0 + DCD cpuss_interrupts_cm0_cti_1_IRQHandler ; CM0+ CTI #1 + DCD cpuss_interrupts_cm4_cti_0_IRQHandler ; CM4 CTI #0 + DCD cpuss_interrupts_cm4_cti_1_IRQHandler ; CM4 CTI #1 + DCD tcpwm_0_interrupts_0_IRQHandler ; TCPWM #0, Counter #0 + DCD tcpwm_0_interrupts_1_IRQHandler ; TCPWM #0, Counter #1 + DCD tcpwm_0_interrupts_2_IRQHandler ; TCPWM #0, Counter #2 + DCD tcpwm_0_interrupts_3_IRQHandler ; TCPWM #0, Counter #3 + DCD tcpwm_0_interrupts_4_IRQHandler ; TCPWM #0, Counter #4 + DCD tcpwm_0_interrupts_5_IRQHandler ; TCPWM #0, Counter #5 + DCD tcpwm_0_interrupts_6_IRQHandler ; TCPWM #0, Counter #6 + DCD tcpwm_0_interrupts_7_IRQHandler ; TCPWM #0, Counter #7 + DCD tcpwm_1_interrupts_0_IRQHandler ; TCPWM #1, Counter #0 + DCD tcpwm_1_interrupts_1_IRQHandler ; TCPWM #1, Counter #1 + DCD tcpwm_1_interrupts_2_IRQHandler ; TCPWM #1, Counter #2 + DCD tcpwm_1_interrupts_3_IRQHandler ; TCPWM #1, Counter #3 + DCD tcpwm_1_interrupts_4_IRQHandler ; TCPWM #1, Counter #4 + DCD tcpwm_1_interrupts_5_IRQHandler ; TCPWM #1, Counter #5 + DCD tcpwm_1_interrupts_6_IRQHandler ; TCPWM #1, Counter #6 + DCD tcpwm_1_interrupts_7_IRQHandler ; TCPWM #1, Counter #7 + DCD tcpwm_1_interrupts_8_IRQHandler ; TCPWM #1, Counter #8 + DCD tcpwm_1_interrupts_9_IRQHandler ; TCPWM #1, Counter #9 + DCD tcpwm_1_interrupts_10_IRQHandler ; TCPWM #1, Counter #10 + DCD tcpwm_1_interrupts_11_IRQHandler ; TCPWM #1, Counter #11 + DCD tcpwm_1_interrupts_12_IRQHandler ; TCPWM #1, Counter #12 + DCD tcpwm_1_interrupts_13_IRQHandler ; TCPWM #1, Counter #13 + DCD tcpwm_1_interrupts_14_IRQHandler ; TCPWM #1, Counter #14 + DCD tcpwm_1_interrupts_15_IRQHandler ; TCPWM #1, Counter #15 + DCD tcpwm_1_interrupts_16_IRQHandler ; TCPWM #1, Counter #16 + DCD tcpwm_1_interrupts_17_IRQHandler ; TCPWM #1, Counter #17 + DCD tcpwm_1_interrupts_18_IRQHandler ; TCPWM #1, Counter #18 + DCD tcpwm_1_interrupts_19_IRQHandler ; TCPWM #1, Counter #19 + DCD tcpwm_1_interrupts_20_IRQHandler ; TCPWM #1, Counter #20 + DCD tcpwm_1_interrupts_21_IRQHandler ; TCPWM #1, Counter #21 + DCD tcpwm_1_interrupts_22_IRQHandler ; TCPWM #1, Counter #22 + DCD tcpwm_1_interrupts_23_IRQHandler ; TCPWM #1, Counter #23 + DCD udb_interrupts_0_IRQHandler ; UDB Interrupt #0 + DCD udb_interrupts_1_IRQHandler ; UDB Interrupt #1 + DCD udb_interrupts_2_IRQHandler ; UDB Interrupt #2 + DCD udb_interrupts_3_IRQHandler ; UDB Interrupt #3 + DCD udb_interrupts_4_IRQHandler ; UDB Interrupt #4 + DCD udb_interrupts_5_IRQHandler ; UDB Interrupt #5 + DCD udb_interrupts_6_IRQHandler ; UDB Interrupt #6 + DCD udb_interrupts_7_IRQHandler ; UDB Interrupt #7 + DCD udb_interrupts_8_IRQHandler ; UDB Interrupt #8 + DCD udb_interrupts_9_IRQHandler ; UDB Interrupt #9 + DCD udb_interrupts_10_IRQHandler ; UDB Interrupt #10 + DCD udb_interrupts_11_IRQHandler ; UDB Interrupt #11 + DCD udb_interrupts_12_IRQHandler ; UDB Interrupt #12 + DCD udb_interrupts_13_IRQHandler ; UDB Interrupt #13 + DCD udb_interrupts_14_IRQHandler ; UDB Interrupt #14 + DCD udb_interrupts_15_IRQHandler ; UDB Interrupt #15 + DCD pass_interrupt_sar_IRQHandler ; SAR ADC interrupt + DCD audioss_interrupt_i2s_IRQHandler ; I2S Audio interrupt + DCD audioss_interrupt_pdm_IRQHandler ; PDM/PCM Audio interrupt + DCD profile_interrupt_IRQHandler ; Energy Profiler interrupt + DCD smif_interrupt_IRQHandler ; Serial Memory Interface interrupt + DCD usb_interrupt_hi_IRQHandler ; USB Interrupt + DCD usb_interrupt_med_IRQHandler ; USB Interrupt + DCD usb_interrupt_lo_IRQHandler ; USB Interrupt + DCD pass_interrupt_dacs_IRQHandler ; Consolidated interrrupt for all DACs + +__Vectors_End + +__Vectors EQU __vector_table +__Vectors_Size EQU __Vectors_End - __Vectors + + SECTION .intvec_ram:DATA:REORDER:NOROOT(2) +__ramVectors + DS32 __Vectors_Size + + + THUMB + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Default handlers +;; + PUBWEAK Default_Handler + SECTION .text:CODE:REORDER:NOROOT(2) +Default_Handler + B Default_Handler + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Weak function for startup customization +;; +;; Note. The global resources are not yet initialized (for example global variables, peripherals, clocks) +;; because this function is executed as the first instruction in the ResetHandler. +;; The PDL is also not initialized to use the proper register offsets. +;; The user of this function is responsible for initializing the PDL and resources before using them. +;; + PUBWEAK Cy_OnResetUser + SECTION .text:CODE:REORDER:NOROOT(2) +Cy_OnResetUser + BX LR + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Define strong version to return zero for +;; __iar_program_start to skip data sections +;; initialization. +;; + PUBLIC __low_level_init + SECTION .text:CODE:REORDER:NOROOT(2) +__low_level_init + MOVS R0, #0 + BX LR + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Default interrupt handlers. +;; + PUBWEAK Reset_Handler + SECTION .text:CODE:REORDER:NOROOT(2) +Reset_Handler + + ; Define strong function for startup customization + LDR R0, =Cy_OnResetUser + BLX R0 + + ; Disable global interrupts + CPSID I + + ; Copy vectors from ROM to RAM + LDR r1, =__vector_table + LDR r0, =__ramVectors + LDR r2, =__Vectors_Size +intvec_copy + LDR r3, [r1] + STR r3, [r0] + ADDS r0, r0, #4 + ADDS r1, r1, #4 + SUBS r2, r2, #1 + CMP r2, #0 + BNE intvec_copy + + ; Update Vector Table Offset Register + LDR r0, =__ramVectors + LDR r1, =0xE000ED08 + STR r0, [r1] + dsb + + ; Initialize data sections + LDR R0, =__iar_data_init3 + BLX R0 + + LDR R0, =SystemInit + BLX R0 + + LDR R0, =__iar_program_start + BLX R0 + +; Should never get here +Cy_Main_Exited + B Cy_Main_Exited + + + PUBWEAK NMI_Handler + SECTION .text:CODE:REORDER:NOROOT(1) +NMI_Handler + B NMI_Handler + + + PUBWEAK Cy_SysLib_FaultHandler + SECTION .text:CODE:REORDER:NOROOT(1) +Cy_SysLib_FaultHandler + B Cy_SysLib_FaultHandler + + PUBWEAK HardFault_Wrapper + SECTION .text:CODE:REORDER:NOROOT(1) +HardFault_Wrapper + IMPORT Cy_SysLib_FaultHandler + movs r0, #4 + mov r1, LR + tst r0, r1 + beq L_MSP + mrs r0, PSP + b L_API_call +L_MSP + mrs r0, MSP +L_API_call + ; Storing LR content for Creator call stack trace + push {LR} + bl Cy_SysLib_FaultHandler + + PUBWEAK HardFault_Handler + SECTION .text:CODE:REORDER:NOROOT(1) +HardFault_Handler + B HardFault_Wrapper + + PUBWEAK MemManage_Handler + SECTION .text:CODE:REORDER:NOROOT(1) +MemManage_Handler + B HardFault_Wrapper + + PUBWEAK BusFault_Handler + SECTION .text:CODE:REORDER:NOROOT(1) +BusFault_Handler + B HardFault_Wrapper + + PUBWEAK UsageFault_Handler + SECTION .text:CODE:REORDER:NOROOT(1) +UsageFault_Handler + B HardFault_Wrapper + + PUBWEAK SVC_Handler + SECTION .text:CODE:REORDER:NOROOT(1) +SVC_Handler + B SVC_Handler + + PUBWEAK DebugMon_Handler + SECTION .text:CODE:REORDER:NOROOT(1) +DebugMon_Handler + B DebugMon_Handler + + PUBWEAK PendSV_Handler + SECTION .text:CODE:REORDER:NOROOT(1) +PendSV_Handler + B PendSV_Handler + + PUBWEAK SysTick_Handler + SECTION .text:CODE:REORDER:NOROOT(1) +SysTick_Handler + B SysTick_Handler + + + ; External interrupts + PUBWEAK ioss_interrupts_gpio_0_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +ioss_interrupts_gpio_0_IRQHandler + B ioss_interrupts_gpio_0_IRQHandler + + PUBWEAK ioss_interrupts_gpio_1_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +ioss_interrupts_gpio_1_IRQHandler + B ioss_interrupts_gpio_1_IRQHandler + + PUBWEAK ioss_interrupts_gpio_2_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +ioss_interrupts_gpio_2_IRQHandler + B ioss_interrupts_gpio_2_IRQHandler + + PUBWEAK ioss_interrupts_gpio_3_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +ioss_interrupts_gpio_3_IRQHandler + B ioss_interrupts_gpio_3_IRQHandler + + PUBWEAK ioss_interrupts_gpio_4_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +ioss_interrupts_gpio_4_IRQHandler + B ioss_interrupts_gpio_4_IRQHandler + + PUBWEAK ioss_interrupts_gpio_5_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +ioss_interrupts_gpio_5_IRQHandler + B ioss_interrupts_gpio_5_IRQHandler + + PUBWEAK ioss_interrupts_gpio_6_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +ioss_interrupts_gpio_6_IRQHandler + B ioss_interrupts_gpio_6_IRQHandler + + PUBWEAK ioss_interrupts_gpio_7_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +ioss_interrupts_gpio_7_IRQHandler + B ioss_interrupts_gpio_7_IRQHandler + + PUBWEAK ioss_interrupts_gpio_8_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +ioss_interrupts_gpio_8_IRQHandler + B ioss_interrupts_gpio_8_IRQHandler + + PUBWEAK ioss_interrupts_gpio_9_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +ioss_interrupts_gpio_9_IRQHandler + B ioss_interrupts_gpio_9_IRQHandler + + PUBWEAK ioss_interrupts_gpio_10_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +ioss_interrupts_gpio_10_IRQHandler + B ioss_interrupts_gpio_10_IRQHandler + + PUBWEAK ioss_interrupts_gpio_11_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +ioss_interrupts_gpio_11_IRQHandler + B ioss_interrupts_gpio_11_IRQHandler + + PUBWEAK ioss_interrupts_gpio_12_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +ioss_interrupts_gpio_12_IRQHandler + B ioss_interrupts_gpio_12_IRQHandler + + PUBWEAK ioss_interrupts_gpio_13_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +ioss_interrupts_gpio_13_IRQHandler + B ioss_interrupts_gpio_13_IRQHandler + + PUBWEAK ioss_interrupts_gpio_14_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +ioss_interrupts_gpio_14_IRQHandler + B ioss_interrupts_gpio_14_IRQHandler + + PUBWEAK ioss_interrupt_gpio_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +ioss_interrupt_gpio_IRQHandler + B ioss_interrupt_gpio_IRQHandler + + PUBWEAK ioss_interrupt_vdd_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +ioss_interrupt_vdd_IRQHandler + B ioss_interrupt_vdd_IRQHandler + + PUBWEAK lpcomp_interrupt_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +lpcomp_interrupt_IRQHandler + B lpcomp_interrupt_IRQHandler + + PUBWEAK scb_8_interrupt_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +scb_8_interrupt_IRQHandler + B scb_8_interrupt_IRQHandler + + PUBWEAK srss_interrupt_mcwdt_0_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +srss_interrupt_mcwdt_0_IRQHandler + B srss_interrupt_mcwdt_0_IRQHandler + + PUBWEAK srss_interrupt_mcwdt_1_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +srss_interrupt_mcwdt_1_IRQHandler + B srss_interrupt_mcwdt_1_IRQHandler + + PUBWEAK srss_interrupt_backup_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +srss_interrupt_backup_IRQHandler + B srss_interrupt_backup_IRQHandler + + PUBWEAK srss_interrupt_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +srss_interrupt_IRQHandler + B srss_interrupt_IRQHandler + + PUBWEAK pass_interrupt_ctbs_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +pass_interrupt_ctbs_IRQHandler + B pass_interrupt_ctbs_IRQHandler + + PUBWEAK bless_interrupt_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +bless_interrupt_IRQHandler + B bless_interrupt_IRQHandler + + PUBWEAK cpuss_interrupts_ipc_0_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_ipc_0_IRQHandler + B cpuss_interrupts_ipc_0_IRQHandler + + PUBWEAK cpuss_interrupts_ipc_1_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_ipc_1_IRQHandler + B cpuss_interrupts_ipc_1_IRQHandler + + PUBWEAK cpuss_interrupts_ipc_2_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_ipc_2_IRQHandler + B cpuss_interrupts_ipc_2_IRQHandler + + PUBWEAK cpuss_interrupts_ipc_3_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_ipc_3_IRQHandler + B cpuss_interrupts_ipc_3_IRQHandler + + PUBWEAK cpuss_interrupts_ipc_4_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_ipc_4_IRQHandler + B cpuss_interrupts_ipc_4_IRQHandler + + PUBWEAK cpuss_interrupts_ipc_5_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_ipc_5_IRQHandler + B cpuss_interrupts_ipc_5_IRQHandler + + PUBWEAK cpuss_interrupts_ipc_6_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_ipc_6_IRQHandler + B cpuss_interrupts_ipc_6_IRQHandler + + PUBWEAK cpuss_interrupts_ipc_7_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_ipc_7_IRQHandler + B cpuss_interrupts_ipc_7_IRQHandler + + PUBWEAK cpuss_interrupts_ipc_8_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_ipc_8_IRQHandler + B cpuss_interrupts_ipc_8_IRQHandler + + PUBWEAK cpuss_interrupts_ipc_9_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_ipc_9_IRQHandler + B cpuss_interrupts_ipc_9_IRQHandler + + PUBWEAK cpuss_interrupts_ipc_10_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_ipc_10_IRQHandler + B cpuss_interrupts_ipc_10_IRQHandler + + PUBWEAK cpuss_interrupts_ipc_11_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_ipc_11_IRQHandler + B cpuss_interrupts_ipc_11_IRQHandler + + PUBWEAK cpuss_interrupts_ipc_12_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_ipc_12_IRQHandler + B cpuss_interrupts_ipc_12_IRQHandler + + PUBWEAK cpuss_interrupts_ipc_13_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_ipc_13_IRQHandler + B cpuss_interrupts_ipc_13_IRQHandler + + PUBWEAK cpuss_interrupts_ipc_14_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_ipc_14_IRQHandler + B cpuss_interrupts_ipc_14_IRQHandler + + PUBWEAK cpuss_interrupts_ipc_15_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_ipc_15_IRQHandler + B cpuss_interrupts_ipc_15_IRQHandler + + PUBWEAK scb_0_interrupt_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +scb_0_interrupt_IRQHandler + B scb_0_interrupt_IRQHandler + + PUBWEAK scb_1_interrupt_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +scb_1_interrupt_IRQHandler + B scb_1_interrupt_IRQHandler + + PUBWEAK scb_2_interrupt_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +scb_2_interrupt_IRQHandler + B scb_2_interrupt_IRQHandler + + PUBWEAK scb_3_interrupt_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +scb_3_interrupt_IRQHandler + B scb_3_interrupt_IRQHandler + + PUBWEAK scb_4_interrupt_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +scb_4_interrupt_IRQHandler + B scb_4_interrupt_IRQHandler + + PUBWEAK scb_5_interrupt_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +scb_5_interrupt_IRQHandler + B scb_5_interrupt_IRQHandler + + PUBWEAK scb_6_interrupt_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +scb_6_interrupt_IRQHandler + B scb_6_interrupt_IRQHandler + + PUBWEAK scb_7_interrupt_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +scb_7_interrupt_IRQHandler + B scb_7_interrupt_IRQHandler + + PUBWEAK csd_interrupt_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +csd_interrupt_IRQHandler + B csd_interrupt_IRQHandler + + PUBWEAK cpuss_interrupts_dw0_0_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw0_0_IRQHandler + B cpuss_interrupts_dw0_0_IRQHandler + + PUBWEAK cpuss_interrupts_dw0_1_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw0_1_IRQHandler + B cpuss_interrupts_dw0_1_IRQHandler + + PUBWEAK cpuss_interrupts_dw0_2_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw0_2_IRQHandler + B cpuss_interrupts_dw0_2_IRQHandler + + PUBWEAK cpuss_interrupts_dw0_3_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw0_3_IRQHandler + B cpuss_interrupts_dw0_3_IRQHandler + + PUBWEAK cpuss_interrupts_dw0_4_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw0_4_IRQHandler + B cpuss_interrupts_dw0_4_IRQHandler + + PUBWEAK cpuss_interrupts_dw0_5_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw0_5_IRQHandler + B cpuss_interrupts_dw0_5_IRQHandler + + PUBWEAK cpuss_interrupts_dw0_6_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw0_6_IRQHandler + B cpuss_interrupts_dw0_6_IRQHandler + + PUBWEAK cpuss_interrupts_dw0_7_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw0_7_IRQHandler + B cpuss_interrupts_dw0_7_IRQHandler + + PUBWEAK cpuss_interrupts_dw0_8_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw0_8_IRQHandler + B cpuss_interrupts_dw0_8_IRQHandler + + PUBWEAK cpuss_interrupts_dw0_9_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw0_9_IRQHandler + B cpuss_interrupts_dw0_9_IRQHandler + + PUBWEAK cpuss_interrupts_dw0_10_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw0_10_IRQHandler + B cpuss_interrupts_dw0_10_IRQHandler + + PUBWEAK cpuss_interrupts_dw0_11_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw0_11_IRQHandler + B cpuss_interrupts_dw0_11_IRQHandler + + PUBWEAK cpuss_interrupts_dw0_12_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw0_12_IRQHandler + B cpuss_interrupts_dw0_12_IRQHandler + + PUBWEAK cpuss_interrupts_dw0_13_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw0_13_IRQHandler + B cpuss_interrupts_dw0_13_IRQHandler + + PUBWEAK cpuss_interrupts_dw0_14_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw0_14_IRQHandler + B cpuss_interrupts_dw0_14_IRQHandler + + PUBWEAK cpuss_interrupts_dw0_15_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw0_15_IRQHandler + B cpuss_interrupts_dw0_15_IRQHandler + + PUBWEAK cpuss_interrupts_dw1_0_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw1_0_IRQHandler + B cpuss_interrupts_dw1_0_IRQHandler + + PUBWEAK cpuss_interrupts_dw1_1_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw1_1_IRQHandler + B cpuss_interrupts_dw1_1_IRQHandler + + PUBWEAK cpuss_interrupts_dw1_2_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw1_2_IRQHandler + B cpuss_interrupts_dw1_2_IRQHandler + + PUBWEAK cpuss_interrupts_dw1_3_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw1_3_IRQHandler + B cpuss_interrupts_dw1_3_IRQHandler + + PUBWEAK cpuss_interrupts_dw1_4_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw1_4_IRQHandler + B cpuss_interrupts_dw1_4_IRQHandler + + PUBWEAK cpuss_interrupts_dw1_5_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw1_5_IRQHandler + B cpuss_interrupts_dw1_5_IRQHandler + + PUBWEAK cpuss_interrupts_dw1_6_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw1_6_IRQHandler + B cpuss_interrupts_dw1_6_IRQHandler + + PUBWEAK cpuss_interrupts_dw1_7_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw1_7_IRQHandler + B cpuss_interrupts_dw1_7_IRQHandler + + PUBWEAK cpuss_interrupts_dw1_8_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw1_8_IRQHandler + B cpuss_interrupts_dw1_8_IRQHandler + + PUBWEAK cpuss_interrupts_dw1_9_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw1_9_IRQHandler + B cpuss_interrupts_dw1_9_IRQHandler + + PUBWEAK cpuss_interrupts_dw1_10_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw1_10_IRQHandler + B cpuss_interrupts_dw1_10_IRQHandler + + PUBWEAK cpuss_interrupts_dw1_11_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw1_11_IRQHandler + B cpuss_interrupts_dw1_11_IRQHandler + + PUBWEAK cpuss_interrupts_dw1_12_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw1_12_IRQHandler + B cpuss_interrupts_dw1_12_IRQHandler + + PUBWEAK cpuss_interrupts_dw1_13_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw1_13_IRQHandler + B cpuss_interrupts_dw1_13_IRQHandler + + PUBWEAK cpuss_interrupts_dw1_14_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw1_14_IRQHandler + B cpuss_interrupts_dw1_14_IRQHandler + + PUBWEAK cpuss_interrupts_dw1_15_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_dw1_15_IRQHandler + B cpuss_interrupts_dw1_15_IRQHandler + + PUBWEAK cpuss_interrupts_fault_0_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_fault_0_IRQHandler + B cpuss_interrupts_fault_0_IRQHandler + + PUBWEAK cpuss_interrupts_fault_1_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_fault_1_IRQHandler + B cpuss_interrupts_fault_1_IRQHandler + + PUBWEAK cpuss_interrupt_crypto_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupt_crypto_IRQHandler + B cpuss_interrupt_crypto_IRQHandler + + PUBWEAK cpuss_interrupt_fm_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupt_fm_IRQHandler + B cpuss_interrupt_fm_IRQHandler + + PUBWEAK cpuss_interrupts_cm0_cti_0_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_cm0_cti_0_IRQHandler + B cpuss_interrupts_cm0_cti_0_IRQHandler + + PUBWEAK cpuss_interrupts_cm0_cti_1_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_cm0_cti_1_IRQHandler + B cpuss_interrupts_cm0_cti_1_IRQHandler + + PUBWEAK cpuss_interrupts_cm4_cti_0_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_cm4_cti_0_IRQHandler + B cpuss_interrupts_cm4_cti_0_IRQHandler + + PUBWEAK cpuss_interrupts_cm4_cti_1_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +cpuss_interrupts_cm4_cti_1_IRQHandler + B cpuss_interrupts_cm4_cti_1_IRQHandler + + PUBWEAK tcpwm_0_interrupts_0_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_0_interrupts_0_IRQHandler + B tcpwm_0_interrupts_0_IRQHandler + + PUBWEAK tcpwm_0_interrupts_1_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_0_interrupts_1_IRQHandler + B tcpwm_0_interrupts_1_IRQHandler + + PUBWEAK tcpwm_0_interrupts_2_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_0_interrupts_2_IRQHandler + B tcpwm_0_interrupts_2_IRQHandler + + PUBWEAK tcpwm_0_interrupts_3_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_0_interrupts_3_IRQHandler + B tcpwm_0_interrupts_3_IRQHandler + + PUBWEAK tcpwm_0_interrupts_4_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_0_interrupts_4_IRQHandler + B tcpwm_0_interrupts_4_IRQHandler + + PUBWEAK tcpwm_0_interrupts_5_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_0_interrupts_5_IRQHandler + B tcpwm_0_interrupts_5_IRQHandler + + PUBWEAK tcpwm_0_interrupts_6_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_0_interrupts_6_IRQHandler + B tcpwm_0_interrupts_6_IRQHandler + + PUBWEAK tcpwm_0_interrupts_7_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_0_interrupts_7_IRQHandler + B tcpwm_0_interrupts_7_IRQHandler + + PUBWEAK tcpwm_1_interrupts_0_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_0_IRQHandler + B tcpwm_1_interrupts_0_IRQHandler + + PUBWEAK tcpwm_1_interrupts_1_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_1_IRQHandler + B tcpwm_1_interrupts_1_IRQHandler + + PUBWEAK tcpwm_1_interrupts_2_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_2_IRQHandler + B tcpwm_1_interrupts_2_IRQHandler + + PUBWEAK tcpwm_1_interrupts_3_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_3_IRQHandler + B tcpwm_1_interrupts_3_IRQHandler + + PUBWEAK tcpwm_1_interrupts_4_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_4_IRQHandler + B tcpwm_1_interrupts_4_IRQHandler + + PUBWEAK tcpwm_1_interrupts_5_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_5_IRQHandler + B tcpwm_1_interrupts_5_IRQHandler + + PUBWEAK tcpwm_1_interrupts_6_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_6_IRQHandler + B tcpwm_1_interrupts_6_IRQHandler + + PUBWEAK tcpwm_1_interrupts_7_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_7_IRQHandler + B tcpwm_1_interrupts_7_IRQHandler + + PUBWEAK tcpwm_1_interrupts_8_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_8_IRQHandler + B tcpwm_1_interrupts_8_IRQHandler + + PUBWEAK tcpwm_1_interrupts_9_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_9_IRQHandler + B tcpwm_1_interrupts_9_IRQHandler + + PUBWEAK tcpwm_1_interrupts_10_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_10_IRQHandler + B tcpwm_1_interrupts_10_IRQHandler + + PUBWEAK tcpwm_1_interrupts_11_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_11_IRQHandler + B tcpwm_1_interrupts_11_IRQHandler + + PUBWEAK tcpwm_1_interrupts_12_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_12_IRQHandler + B tcpwm_1_interrupts_12_IRQHandler + + PUBWEAK tcpwm_1_interrupts_13_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_13_IRQHandler + B tcpwm_1_interrupts_13_IRQHandler + + PUBWEAK tcpwm_1_interrupts_14_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_14_IRQHandler + B tcpwm_1_interrupts_14_IRQHandler + + PUBWEAK tcpwm_1_interrupts_15_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_15_IRQHandler + B tcpwm_1_interrupts_15_IRQHandler + + PUBWEAK tcpwm_1_interrupts_16_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_16_IRQHandler + B tcpwm_1_interrupts_16_IRQHandler + + PUBWEAK tcpwm_1_interrupts_17_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_17_IRQHandler + B tcpwm_1_interrupts_17_IRQHandler + + PUBWEAK tcpwm_1_interrupts_18_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_18_IRQHandler + B tcpwm_1_interrupts_18_IRQHandler + + PUBWEAK tcpwm_1_interrupts_19_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_19_IRQHandler + B tcpwm_1_interrupts_19_IRQHandler + + PUBWEAK tcpwm_1_interrupts_20_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_20_IRQHandler + B tcpwm_1_interrupts_20_IRQHandler + + PUBWEAK tcpwm_1_interrupts_21_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_21_IRQHandler + B tcpwm_1_interrupts_21_IRQHandler + + PUBWEAK tcpwm_1_interrupts_22_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_22_IRQHandler + B tcpwm_1_interrupts_22_IRQHandler + + PUBWEAK tcpwm_1_interrupts_23_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +tcpwm_1_interrupts_23_IRQHandler + B tcpwm_1_interrupts_23_IRQHandler + + PUBWEAK udb_interrupts_0_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +udb_interrupts_0_IRQHandler + B udb_interrupts_0_IRQHandler + + PUBWEAK udb_interrupts_1_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +udb_interrupts_1_IRQHandler + B udb_interrupts_1_IRQHandler + + PUBWEAK udb_interrupts_2_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +udb_interrupts_2_IRQHandler + B udb_interrupts_2_IRQHandler + + PUBWEAK udb_interrupts_3_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +udb_interrupts_3_IRQHandler + B udb_interrupts_3_IRQHandler + + PUBWEAK udb_interrupts_4_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +udb_interrupts_4_IRQHandler + B udb_interrupts_4_IRQHandler + + PUBWEAK udb_interrupts_5_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +udb_interrupts_5_IRQHandler + B udb_interrupts_5_IRQHandler + + PUBWEAK udb_interrupts_6_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +udb_interrupts_6_IRQHandler + B udb_interrupts_6_IRQHandler + + PUBWEAK udb_interrupts_7_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +udb_interrupts_7_IRQHandler + B udb_interrupts_7_IRQHandler + + PUBWEAK udb_interrupts_8_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +udb_interrupts_8_IRQHandler + B udb_interrupts_8_IRQHandler + + PUBWEAK udb_interrupts_9_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +udb_interrupts_9_IRQHandler + B udb_interrupts_9_IRQHandler + + PUBWEAK udb_interrupts_10_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +udb_interrupts_10_IRQHandler + B udb_interrupts_10_IRQHandler + + PUBWEAK udb_interrupts_11_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +udb_interrupts_11_IRQHandler + B udb_interrupts_11_IRQHandler + + PUBWEAK udb_interrupts_12_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +udb_interrupts_12_IRQHandler + B udb_interrupts_12_IRQHandler + + PUBWEAK udb_interrupts_13_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +udb_interrupts_13_IRQHandler + B udb_interrupts_13_IRQHandler + + PUBWEAK udb_interrupts_14_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +udb_interrupts_14_IRQHandler + B udb_interrupts_14_IRQHandler + + PUBWEAK udb_interrupts_15_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +udb_interrupts_15_IRQHandler + B udb_interrupts_15_IRQHandler + + PUBWEAK pass_interrupt_sar_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +pass_interrupt_sar_IRQHandler + B pass_interrupt_sar_IRQHandler + + PUBWEAK audioss_interrupt_i2s_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +audioss_interrupt_i2s_IRQHandler + B audioss_interrupt_i2s_IRQHandler + + PUBWEAK audioss_interrupt_pdm_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +audioss_interrupt_pdm_IRQHandler + B audioss_interrupt_pdm_IRQHandler + + PUBWEAK profile_interrupt_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +profile_interrupt_IRQHandler + B profile_interrupt_IRQHandler + + PUBWEAK smif_interrupt_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +smif_interrupt_IRQHandler + B smif_interrupt_IRQHandler + + PUBWEAK usb_interrupt_hi_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +usb_interrupt_hi_IRQHandler + B usb_interrupt_hi_IRQHandler + + PUBWEAK usb_interrupt_med_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +usb_interrupt_med_IRQHandler + B usb_interrupt_med_IRQHandler + + PUBWEAK usb_interrupt_lo_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +usb_interrupt_lo_IRQHandler + B usb_interrupt_lo_IRQHandler + + PUBWEAK pass_interrupt_dacs_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +pass_interrupt_dacs_IRQHandler + B pass_interrupt_dacs_IRQHandler + + + END + + +; [] END OF FILE diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM4/system_psoc6_cm4.c b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM4/system_psoc6_cm4.c new file mode 100644 index 00000000000..0a18f50a4d4 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/COMPONENT_CM4/system_psoc6_cm4.c @@ -0,0 +1,552 @@ +/***************************************************************************//** +* \file system_psoc6_cm4.c +* \version 2.60 +* +* The device system-source file. +* +******************************************************************************** +* \copyright +* Copyright 2016-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*******************************************************************************/ + +#include +#include "system_psoc6.h" +#include "cy_device.h" +#include "cy_device_headers.h" +#include "cy_syslib.h" +#include "cy_wdt.h" + +#if !defined(CY_IPC_DEFAULT_CFG_DISABLE) + #include "cy_ipc_sema.h" + #include "cy_ipc_pipe.h" + #include "cy_ipc_drv.h" + + #if defined(CY_DEVICE_PSOC6ABLE2) + #include "cy_flash.h" + #endif /* defined(CY_DEVICE_PSOC6ABLE2) */ +#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */ + + +/******************************************************************************* +* SystemCoreClockUpdate() +*******************************************************************************/ + +/** Default HFClk frequency in Hz */ +#define CY_CLK_HFCLK0_FREQ_HZ_DEFAULT (8000000UL) + +/** Default PeriClk frequency in Hz */ +#define CY_CLK_PERICLK_FREQ_HZ_DEFAULT (4000000UL) + +/** Default SlowClk system core frequency in Hz */ +#define CY_CLK_SYSTEM_FREQ_HZ_DEFAULT (8000000UL) + +/** IMO frequency in Hz */ +#define CY_CLK_IMO_FREQ_HZ (8000000UL) + +/** HVILO frequency in Hz */ +#define CY_CLK_HVILO_FREQ_HZ (32000UL) + +/** PILO frequency in Hz */ +#define CY_CLK_PILO_FREQ_HZ (32768UL) + +/** WCO frequency in Hz */ +#define CY_CLK_WCO_FREQ_HZ (32768UL) + +/** ALTLF frequency in Hz */ +#define CY_CLK_ALTLF_FREQ_HZ (32768UL) + + +/** +* Holds the SlowClk (Cortex-M0+) or FastClk (Cortex-M4) system core clock, +* which is the system clock frequency supplied to the SysTick timer and the +* processor core clock. +* This variable implements CMSIS Core global variable. +* Refer to the [CMSIS documentation] +* (http://www.keil.com/pack/doc/CMSIS/Core/html/group__system__init__gr.html "System and Clock Configuration") +* for more details. +* This variable can be used by debuggers to query the frequency +* of the debug timer or to configure the trace clock speed. +* +* \attention Compilers must be configured to avoid removing this variable in case +* the application program is not using it. Debugging systems require the variable +* to be physically present in memory so that it can be examined to configure the debugger. */ +uint32_t SystemCoreClock = CY_CLK_SYSTEM_FREQ_HZ_DEFAULT; + +/** Holds the HFClk0 clock frequency. Updated by \ref SystemCoreClockUpdate(). */ +uint32_t cy_Hfclk0FreqHz = CY_CLK_HFCLK0_FREQ_HZ_DEFAULT; + +/** Holds the PeriClk clock frequency. Updated by \ref SystemCoreClockUpdate(). */ +uint32_t cy_PeriClkFreqHz = CY_CLK_PERICLK_FREQ_HZ_DEFAULT; + +/** Holds the Alternate high frequency clock in Hz. Updated by \ref SystemCoreClockUpdate(). */ +#if (defined (CY_IP_MXBLESS) && (CY_IP_MXBLESS == 1UL)) || defined (CY_DOXYGEN) + uint32_t cy_BleEcoClockFreqHz = CY_CLK_ALTHF_FREQ_HZ; +#endif /* (defined (CY_IP_MXBLESS) && (CY_IP_MXBLESS == 1UL)) || defined (CY_DOXYGEN) */ + +/* SCB->CPACR */ +#define SCB_CPACR_CP10_CP11_ENABLE (0xFUL << 20u) + + +/******************************************************************************* +* SystemInit() +*******************************************************************************/ + +/* CLK_FLL_CONFIG default values */ +#define CY_FB_CLK_FLL_CONFIG_VALUE (0x01000000u) +#define CY_FB_CLK_FLL_CONFIG2_VALUE (0x00020001u) +#define CY_FB_CLK_FLL_CONFIG3_VALUE (0x00002800u) +#define CY_FB_CLK_FLL_CONFIG4_VALUE (0x000000FFu) + + +/******************************************************************************* +* SystemCoreClockUpdate (void) +*******************************************************************************/ + +/* Do not use these definitions directly in your application */ +#define CY_DELAY_MS_OVERFLOW_THRESHOLD (0x8000u) +#define CY_DELAY_1K_THRESHOLD (1000u) +#define CY_DELAY_1K_MINUS_1_THRESHOLD (CY_DELAY_1K_THRESHOLD - 1u) +#define CY_DELAY_1M_THRESHOLD (1000000u) +#define CY_DELAY_1M_MINUS_1_THRESHOLD (CY_DELAY_1M_THRESHOLD - 1u) +uint32_t cy_delayFreqHz = CY_CLK_SYSTEM_FREQ_HZ_DEFAULT; + +uint32_t cy_delayFreqKhz = (CY_CLK_SYSTEM_FREQ_HZ_DEFAULT + CY_DELAY_1K_MINUS_1_THRESHOLD) / + CY_DELAY_1K_THRESHOLD; + +uint8_t cy_delayFreqMhz = (uint8_t)((CY_CLK_SYSTEM_FREQ_HZ_DEFAULT + CY_DELAY_1M_MINUS_1_THRESHOLD) / + CY_DELAY_1M_THRESHOLD); + +uint32_t cy_delay32kMs = CY_DELAY_MS_OVERFLOW_THRESHOLD * + ((CY_CLK_SYSTEM_FREQ_HZ_DEFAULT + CY_DELAY_1K_MINUS_1_THRESHOLD) / CY_DELAY_1K_THRESHOLD); + +#define CY_ROOT_PATH_SRC_IMO (0UL) +#define CY_ROOT_PATH_SRC_EXT (1UL) +#if (SRSS_ECO_PRESENT == 1U) + #define CY_ROOT_PATH_SRC_ECO (2UL) +#endif /* (SRSS_ECO_PRESENT == 1U) */ +#if (SRSS_ALTHF_PRESENT == 1U) + #define CY_ROOT_PATH_SRC_ALTHF (3UL) +#endif /* (SRSS_ALTHF_PRESENT == 1U) */ +#define CY_ROOT_PATH_SRC_DSI_MUX (4UL) +#define CY_ROOT_PATH_SRC_DSI_MUX_HVILO (16UL) +#define CY_ROOT_PATH_SRC_DSI_MUX_WCO (17UL) +#if (SRSS_ALTLF_PRESENT == 1U) + #define CY_ROOT_PATH_SRC_DSI_MUX_ALTLF (18UL) +#endif /* (SRSS_ALTLF_PRESENT == 1U) */ +#if (SRSS_PILO_PRESENT == 1U) + #define CY_ROOT_PATH_SRC_DSI_MUX_PILO (19UL) +#endif /* (SRSS_PILO_PRESENT == 1U) */ + + +/******************************************************************************* +* Function Name: SystemInit +****************************************************************************//** +* \cond +* Initializes the system: +* - Restores FLL registers to the default state for single core devices. +* - Unlocks and disables WDT. +* - Calls Cy_PDL_Init() function to define the driver library. +* - Calls the Cy_SystemInit() function, if compiled from PSoC Creator. +* - Calls \ref SystemCoreClockUpdate(). +* \endcond +*******************************************************************************/ +void SystemInit(void) +{ + Cy_PDL_Init(CY_DEVICE_CFG); + +#ifdef __CM0P_PRESENT + #if (__CM0P_PRESENT == 0) + /* Restore FLL registers to the default state as they are not restored by the ROM code */ + uint32_t copy = SRSS->CLK_FLL_CONFIG; + copy &= ~SRSS_CLK_FLL_CONFIG_FLL_ENABLE_Msk; + SRSS->CLK_FLL_CONFIG = copy; + + copy = SRSS->CLK_ROOT_SELECT[0u]; + copy &= ~SRSS_CLK_ROOT_SELECT_ROOT_DIV_Msk; /* Set ROOT_DIV = 0*/ + SRSS->CLK_ROOT_SELECT[0u] = copy; + + SRSS->CLK_FLL_CONFIG = CY_FB_CLK_FLL_CONFIG_VALUE; + SRSS->CLK_FLL_CONFIG2 = CY_FB_CLK_FLL_CONFIG2_VALUE; + SRSS->CLK_FLL_CONFIG3 = CY_FB_CLK_FLL_CONFIG3_VALUE; + SRSS->CLK_FLL_CONFIG4 = CY_FB_CLK_FLL_CONFIG4_VALUE; + + /* Unlock and disable WDT */ + Cy_WDT_Unlock(); + Cy_WDT_Disable(); + #endif /* (__CM0P_PRESENT == 0) */ +#endif /* __CM0P_PRESENT */ + + Cy_SystemInit(); + SystemCoreClockUpdate(); + +#if !defined(CY_IPC_DEFAULT_CFG_DISABLE) + +#ifdef __CM0P_PRESENT + #if (__CM0P_PRESENT == 0) + /* Allocate and initialize semaphores for the system operations. */ + static uint32_t ipcSemaArray[CY_IPC_SEMA_COUNT / CY_IPC_SEMA_PER_WORD]; + (void) Cy_IPC_Sema_Init(CY_IPC_CHAN_SEMA, CY_IPC_SEMA_COUNT, ipcSemaArray); + #else + (void) Cy_IPC_Sema_Init(CY_IPC_CHAN_SEMA, 0ul, NULL); + #endif /* (__CM0P_PRESENT) */ +#else + (void) Cy_IPC_Sema_Init(CY_IPC_CHAN_SEMA, 0ul, NULL); +#endif /* __CM0P_PRESENT */ + + + /******************************************************************************** + * + * Initializes the system pipes. The system pipes are used by BLE and Flash. + * + * If the default startup file is not used, or SystemInit() is not called in your + * project, call the following three functions prior to executing any flash or + * EmEEPROM write or erase operation: + * -# Cy_IPC_Sema_Init() + * -# Cy_IPC_Pipe_Config() + * -# Cy_IPC_Pipe_Init() + * -# Cy_Flash_Init() + * + *******************************************************************************/ + /* Create an array of endpoint structures */ + static cy_stc_ipc_pipe_ep_t systemIpcPipeEpArray[CY_IPC_MAX_ENDPOINTS]; + + Cy_IPC_Pipe_Config(systemIpcPipeEpArray); + + static cy_ipc_pipe_callback_ptr_t systemIpcPipeSysCbArray[CY_SYS_CYPIPE_CLIENT_CNT]; + + static const cy_stc_ipc_pipe_config_t systemIpcPipeConfigCm4 = + { + /* .ep0ConfigData */ + { + /* .ipcNotifierNumber */ CY_IPC_INTR_CYPIPE_EP0, + /* .ipcNotifierPriority */ CY_SYS_INTR_CYPIPE_PRIOR_EP0, + /* .ipcNotifierMuxNumber */ CY_SYS_INTR_CYPIPE_MUX_EP0, + /* .epAddress */ CY_IPC_EP_CYPIPE_CM0_ADDR, + /* .epConfig */ CY_SYS_CYPIPE_CONFIG_EP0 + }, + /* .ep1ConfigData */ + { + /* .ipcNotifierNumber */ CY_IPC_INTR_CYPIPE_EP1, + /* .ipcNotifierPriority */ CY_SYS_INTR_CYPIPE_PRIOR_EP1, + /* .ipcNotifierMuxNumber */ 0u, + /* .epAddress */ CY_IPC_EP_CYPIPE_CM4_ADDR, + /* .epConfig */ CY_SYS_CYPIPE_CONFIG_EP1 + }, + /* .endpointClientsCount */ CY_SYS_CYPIPE_CLIENT_CNT, + /* .endpointsCallbacksArray */ systemIpcPipeSysCbArray, + /* .userPipeIsrHandler */ &Cy_SysIpcPipeIsrCm4 + }; + + if (cy_device->flashPipeRequired != 0u) + { + Cy_IPC_Pipe_Init(&systemIpcPipeConfigCm4); + } + +#if defined(CY_DEVICE_PSOC6ABLE2) + Cy_Flash_Init(); +#endif /* defined(CY_DEVICE_PSOC6ABLE2) */ + +#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */ +} + + +/******************************************************************************* +* Function Name: Cy_SystemInit +****************************************************************************//** +* +* The function is called during device startup. Once project compiled as part of +* the PSoC Creator project, the Cy_SystemInit() function is generated by the +* PSoC Creator. +* +* The function generated by PSoC Creator performs all of the necessary device +* configuration based on the design settings. This includes settings from the +* Design Wide Resources (DWR) such as Clocks and Pins as well as any component +* configuration that is necessary. +* +*******************************************************************************/ +__WEAK void Cy_SystemInit(void) +{ + /* Empty weak function. The actual implementation to be in the PSoC Creator + * generated strong function. + */ +} + + +/******************************************************************************* +* Function Name: SystemCoreClockUpdate +****************************************************************************//** +* +* Gets core clock frequency and updates \ref SystemCoreClock, \ref +* cy_Hfclk0FreqHz, and \ref cy_PeriClkFreqHz. +* +* Updates global variables used by the \ref Cy_SysLib_Delay(), \ref +* Cy_SysLib_DelayUs(), and \ref Cy_SysLib_DelayCycles(). +* +*******************************************************************************/ +void SystemCoreClockUpdate (void) +{ + uint32_t srcFreqHz; + uint32_t pathFreqHz; + uint32_t fastClkDiv; + uint32_t periClkDiv; + uint32_t rootPath; + uint32_t srcClk; + + /* Get root path clock for the high-frequency clock # 0 */ + rootPath = _FLD2VAL(SRSS_CLK_ROOT_SELECT_ROOT_MUX, SRSS->CLK_ROOT_SELECT[0u]); + + /* Get source of the root path clock */ + srcClk = _FLD2VAL(SRSS_CLK_PATH_SELECT_PATH_MUX, SRSS->CLK_PATH_SELECT[rootPath]); + + /* Get frequency of the source */ + switch (srcClk) + { + case CY_ROOT_PATH_SRC_IMO: + srcFreqHz = CY_CLK_IMO_FREQ_HZ; + break; + + case CY_ROOT_PATH_SRC_EXT: + srcFreqHz = CY_CLK_EXT_FREQ_HZ; + break; + + #if (SRSS_ECO_PRESENT == 1U) + case CY_ROOT_PATH_SRC_ECO: + srcFreqHz = CY_CLK_ECO_FREQ_HZ; + break; + #endif /* (SRSS_ECO_PRESENT == 1U) */ + +#if defined (CY_IP_MXBLESS) && (CY_IP_MXBLESS == 1UL) && (SRSS_ALTHF_PRESENT == 1U) + case CY_ROOT_PATH_SRC_ALTHF: + srcFreqHz = cy_BleEcoClockFreqHz; + break; +#endif /* defined (CY_IP_MXBLESS) && (CY_IP_MXBLESS == 1UL) && (SRSS_ALTHF_PRESENT == 1U) */ + + case CY_ROOT_PATH_SRC_DSI_MUX: + { + uint32_t dsi_src; + dsi_src = _FLD2VAL(SRSS_CLK_DSI_SELECT_DSI_MUX, SRSS->CLK_DSI_SELECT[rootPath]); + switch (dsi_src) + { + case CY_ROOT_PATH_SRC_DSI_MUX_HVILO: + srcFreqHz = CY_CLK_HVILO_FREQ_HZ; + break; + + case CY_ROOT_PATH_SRC_DSI_MUX_WCO: + srcFreqHz = CY_CLK_WCO_FREQ_HZ; + break; + + #if (SRSS_ALTLF_PRESENT == 1U) + case CY_ROOT_PATH_SRC_DSI_MUX_ALTLF: + srcFreqHz = CY_CLK_ALTLF_FREQ_HZ; + break; + #endif /* (SRSS_ALTLF_PRESENT == 1U) */ + + #if (SRSS_PILO_PRESENT == 1U) + case CY_ROOT_PATH_SRC_DSI_MUX_PILO: + srcFreqHz = CY_CLK_PILO_FREQ_HZ; + break; + #endif /* (SRSS_PILO_PRESENT == 1U) */ + + default: + srcFreqHz = CY_CLK_HVILO_FREQ_HZ; + break; + } + } + break; + + default: + srcFreqHz = CY_CLK_EXT_FREQ_HZ; + break; + } + + if (rootPath == 0UL) + { + /* FLL */ + bool fllLocked = ( 0UL != _FLD2VAL(SRSS_CLK_FLL_STATUS_LOCKED, SRSS->CLK_FLL_STATUS)); + bool fllOutputOutput = ( 3UL == _FLD2VAL(SRSS_CLK_FLL_CONFIG3_BYPASS_SEL, SRSS->CLK_FLL_CONFIG3)); + bool fllOutputAuto = ((0UL == _FLD2VAL(SRSS_CLK_FLL_CONFIG3_BYPASS_SEL, SRSS->CLK_FLL_CONFIG3)) || + (1UL == _FLD2VAL(SRSS_CLK_FLL_CONFIG3_BYPASS_SEL, SRSS->CLK_FLL_CONFIG3))); + if ((fllOutputAuto && fllLocked) || fllOutputOutput) + { + uint32_t fllMult; + uint32_t refDiv; + uint32_t outputDiv; + + fllMult = _FLD2VAL(SRSS_CLK_FLL_CONFIG_FLL_MULT, SRSS->CLK_FLL_CONFIG); + refDiv = _FLD2VAL(SRSS_CLK_FLL_CONFIG2_FLL_REF_DIV, SRSS->CLK_FLL_CONFIG2); + outputDiv = _FLD2VAL(SRSS_CLK_FLL_CONFIG_FLL_OUTPUT_DIV, SRSS->CLK_FLL_CONFIG) + 1UL; + + pathFreqHz = ((srcFreqHz / refDiv) * fllMult) / outputDiv; + } + else + { + pathFreqHz = srcFreqHz; + } + } + else if ((rootPath == 1UL) || (rootPath == 2UL)) + { + /* PLL */ + bool pllLocked = ( 0UL != _FLD2VAL(SRSS_CLK_PLL_STATUS_LOCKED, SRSS->CLK_PLL_STATUS[rootPath - 1UL])); + bool pllOutputOutput = ( 3UL == _FLD2VAL(SRSS_CLK_PLL_CONFIG_BYPASS_SEL, SRSS->CLK_PLL_CONFIG[rootPath - 1UL])); + bool pllOutputAuto = ((0UL == _FLD2VAL(SRSS_CLK_PLL_CONFIG_BYPASS_SEL, SRSS->CLK_PLL_CONFIG[rootPath - 1UL])) || + (1UL == _FLD2VAL(SRSS_CLK_PLL_CONFIG_BYPASS_SEL, SRSS->CLK_PLL_CONFIG[rootPath - 1UL]))); + if ((pllOutputAuto && pllLocked) || pllOutputOutput) + { + uint32_t feedbackDiv; + uint32_t referenceDiv; + uint32_t outputDiv; + + feedbackDiv = _FLD2VAL(SRSS_CLK_PLL_CONFIG_FEEDBACK_DIV, SRSS->CLK_PLL_CONFIG[rootPath - 1UL]); + referenceDiv = _FLD2VAL(SRSS_CLK_PLL_CONFIG_REFERENCE_DIV, SRSS->CLK_PLL_CONFIG[rootPath - 1UL]); + outputDiv = _FLD2VAL(SRSS_CLK_PLL_CONFIG_OUTPUT_DIV, SRSS->CLK_PLL_CONFIG[rootPath - 1UL]); + + pathFreqHz = ((srcFreqHz * feedbackDiv) / referenceDiv) / outputDiv; + + } + else + { + pathFreqHz = srcFreqHz; + } + } + else + { + /* Direct */ + pathFreqHz = srcFreqHz; + } + + /* Get frequency after hf_clk pre-divider */ + pathFreqHz = pathFreqHz >> _FLD2VAL(SRSS_CLK_ROOT_SELECT_ROOT_DIV, SRSS->CLK_ROOT_SELECT[0u]); + cy_Hfclk0FreqHz = pathFreqHz; + + /* Fast Clock Divider */ + fastClkDiv = 1u + _FLD2VAL(CPUSS_CM4_CLOCK_CTL_FAST_INT_DIV, CPUSS->CM4_CLOCK_CTL); + + /* Peripheral Clock Divider */ + periClkDiv = 1u + _FLD2VAL(CPUSS_CM0_CLOCK_CTL_PERI_INT_DIV, CPUSS->CM0_CLOCK_CTL); + cy_PeriClkFreqHz = pathFreqHz / periClkDiv; + + pathFreqHz = pathFreqHz / fastClkDiv; + SystemCoreClock = pathFreqHz; + + /* Sets clock frequency for Delay API */ + cy_delayFreqHz = SystemCoreClock; + cy_delayFreqMhz = (uint8_t)((cy_delayFreqHz + CY_DELAY_1M_MINUS_1_THRESHOLD) / CY_DELAY_1M_THRESHOLD); + cy_delayFreqKhz = (cy_delayFreqHz + CY_DELAY_1K_MINUS_1_THRESHOLD) / CY_DELAY_1K_THRESHOLD; + cy_delay32kMs = CY_DELAY_MS_OVERFLOW_THRESHOLD * cy_delayFreqKhz; +} + + +/******************************************************************************* +* Function Name: Cy_SystemInitFpuEnable +****************************************************************************//** +* +* Enables the FPU if it is used. The function is called from the startup file. +* +*******************************************************************************/ +void Cy_SystemInitFpuEnable(void) +{ + #if defined (__FPU_USED) && (__FPU_USED == 1U) + uint32_t interruptState; + interruptState = Cy_SysLib_EnterCriticalSection(); + SCB->CPACR |= SCB_CPACR_CP10_CP11_ENABLE; + __DSB(); + __ISB(); + Cy_SysLib_ExitCriticalSection(interruptState); + #endif /* (__FPU_USED) && (__FPU_USED == 1U) */ +} + + +#if !defined(CY_IPC_DEFAULT_CFG_DISABLE) +/******************************************************************************* +* Function Name: Cy_SysIpcPipeIsrCm4 +****************************************************************************//** +* +* This is the interrupt service routine for the system pipe. +* +*******************************************************************************/ +void Cy_SysIpcPipeIsrCm4(void) +{ + Cy_IPC_Pipe_ExecuteCallback(CY_IPC_EP_CYPIPE_CM4_ADDR); +} +#endif + + +/******************************************************************************* +* Function Name: Cy_MemorySymbols +****************************************************************************//** +* +* The intention of the function is to declare boundaries of the memories for the +* MDK compilers. For the rest of the supported compilers, this is done using +* linker configuration files. The following symbols used by the cymcuelftool. +* +*******************************************************************************/ +#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION < 6010050) +__asm void Cy_MemorySymbols(void) +{ + /* Flash */ + EXPORT __cy_memory_0_start + EXPORT __cy_memory_0_length + EXPORT __cy_memory_0_row_size + + /* Working Flash */ + EXPORT __cy_memory_1_start + EXPORT __cy_memory_1_length + EXPORT __cy_memory_1_row_size + + /* Supervisory Flash */ + EXPORT __cy_memory_2_start + EXPORT __cy_memory_2_length + EXPORT __cy_memory_2_row_size + + /* XIP */ + EXPORT __cy_memory_3_start + EXPORT __cy_memory_3_length + EXPORT __cy_memory_3_row_size + + /* eFuse */ + EXPORT __cy_memory_4_start + EXPORT __cy_memory_4_length + EXPORT __cy_memory_4_row_size + + /* Flash */ +__cy_memory_0_start EQU __cpp(CY_FLASH_BASE) +__cy_memory_0_length EQU __cpp(CY_FLASH_SIZE) +__cy_memory_0_row_size EQU 0x200 + + /* Flash region for EEPROM emulation */ +__cy_memory_1_start EQU __cpp(CY_EM_EEPROM_BASE) +__cy_memory_1_length EQU __cpp(CY_EM_EEPROM_SIZE) +__cy_memory_1_row_size EQU 0x200 + + /* Supervisory Flash */ +__cy_memory_2_start EQU __cpp(CY_SFLASH_BASE) +__cy_memory_2_length EQU __cpp(CY_SFLASH_SIZE) +__cy_memory_2_row_size EQU 0x200 + + /* XIP */ +__cy_memory_3_start EQU __cpp(CY_XIP_BASE) +__cy_memory_3_length EQU __cpp(CY_XIP_SIZE) +__cy_memory_3_row_size EQU 0x200 + + /* eFuse */ +__cy_memory_4_start EQU __cpp(0x90700000) +__cy_memory_4_length EQU __cpp(0x100000) +__cy_memory_4_row_size EQU __cpp(1) +} +#endif /* defined (__ARMCC_VERSION) && (__ARMCC_VERSION < 6010050) */ + + +/* [] END OF FILE */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/system_psoc6.h b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/system_psoc6.h new file mode 100644 index 00000000000..423361f58ab --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/device/system_psoc6.h @@ -0,0 +1,680 @@ +/***************************************************************************//** +* \file system_psoc6.h +* \version 2.60 +* +* \brief Device system header file. +* +******************************************************************************** +* \copyright +* Copyright 2016-2019 Cypress Semiconductor Corporation +* SPDX-License-Identifier: Apache-2.0 +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*******************************************************************************/ + + +#ifndef _SYSTEM_PSOC6_H_ +#define _SYSTEM_PSOC6_H_ + +/** +* \addtogroup group_system_config +* \{ +* Provides device startup, system configuration, and linker script files. +* The system startup provides the followings features: +* - See \ref group_system_config_device_initialization for the: +* * \ref group_system_config_dual_core_device_initialization +* * \ref group_system_config_single_core_device_initialization +* - \ref group_system_config_device_memory_definition +* - \ref group_system_config_heap_stack_config +* - \ref group_system_config_merge_apps +* - \ref group_system_config_default_handlers +* - \ref group_system_config_device_vector_table +* - \ref group_system_config_cm4_functions +* +* \section group_system_config_configuration Configuration Considerations +* +* \subsection group_system_config_device_memory_definition Device Memory Definition +* The flash and RAM allocation for each CPU is defined by the linker scripts. +* For dual-core devices, the physical flash and RAM memory is shared between the CPU cores. +* 2 KB of RAM (allocated at the end of RAM) are reserved for system use. +* For Single-Core devices the system reserves additional 80 bytes of RAM. +* Using the reserved memory area for other purposes will lead to unexpected behavior. +* +* \note The linker files provided with the PDL are generic and handle all common +* use cases. Your project may not use every section defined in the linker files. +* In that case you may see warnings during the build process. To eliminate build +* warnings in your project, you can simply comment out or remove the relevant +* code in the linker file. +* +* ARM GCC\n +* The flash and RAM sections for the CPU are defined in the linker files: +* 'xx_yy.ld', where 'xx' is the device group, and 'yy' is the target CPU; for example, +* 'cy8c6xx7_cm0plus.ld' and 'cy8c6xx7_cm4_dual.ld'. +* \note If the start of the Cortex-M4 application image is changed, the value +* of the of the \ref CY_CORTEX_M4_APPL_ADDR should also be changed. The +* \ref CY_CORTEX_M4_APPL_ADDR macro should be used as the parameter for the +* Cy_SysEnableCM4() function call. +* +* Change the flash and RAM sizes by editing the macros value in the +* linker files for both CPUs: +* - 'xx_cm0plus.ld', where 'xx' is the device group: +* \code +* flash (rx) : ORIGIN = 0x10000000, LENGTH = 0x00080000 +* ram (rwx) : ORIGIN = 0x08000000, LENGTH = 0x00024000 +* \endcode +* - 'xx_cm4_dual.ld', where 'xx' is the device group: +* \code +* flash (rx) : ORIGIN = 0x10080000, LENGTH = 0x00080000 +* ram (rwx) : ORIGIN = 0x08024000, LENGTH = 0x00023800 +* \endcode +* +* Change the value of the \ref CY_CORTEX_M4_APPL_ADDR macro to the rom ORIGIN's +* value in the 'xx_cm4_dual.ld' file, where 'xx' is the device group. Do this +* by either: +* - Passing the following commands to the compiler:\n +* \code -D CY_CORTEX_M4_APPL_ADDR=0x10080000 \endcode +* - Editing the \ref CY_CORTEX_M4_APPL_ADDR value in the 'system_xx.h', where 'xx' is device family:\n +* \code #define CY_CORTEX_M4_APPL_ADDR (0x10080000u) \endcode +* +* ARM MDK\n +* The flash and RAM sections for the CPU are defined in the linker files: +* 'xx_yy.scat', where 'xx' is the device group, and 'yy' is the target CPU; for example, +* 'cy8c6xx7_cm0plus.scat' and 'cy8c6xx7_cm4_dual.scat'. +* \note If the start of the Cortex-M4 application image is changed, the value +* of the of the \ref CY_CORTEX_M4_APPL_ADDR should also be changed. The +* \ref CY_CORTEX_M4_APPL_ADDR macro should be used as the parameter for the \ref +* Cy_SysEnableCM4() function call. +* +* \note The linker files provided with the PDL are generic and handle all common +* use cases. Your project may not use every section defined in the linker files. +* In that case you may see the warnings during the build process: +* L6314W (no section matches pattern) and/or L6329W +* (pattern only matches removed unused sections). In your project, you can +* suppress the warning by passing the "--diag_suppress=L6314W,L6329W" option to +* the linker. You can also comment out or remove the relevant code in the linker +* file. +* +* Change the flash and RAM sizes by editing the macros value in the +* linker files for both CPUs: +* - 'xx_cm0plus.scat', where 'xx' is the device group: +* \code +* #define FLASH_START 0x10000000 +* #define FLASH_SIZE 0x00080000 +* #define RAM_START 0x08000000 +* #define RAM_SIZE 0x00024000 +* \endcode +* - 'xx_cm4_dual.scat', where 'xx' is the device group: +* \code +* #define FLASH_START 0x10080000 +* #define FLASH_SIZE 0x00080000 +* #define RAM_START 0x08024000 +* #define RAM_SIZE 0x00023800 +* \endcode +* +* Change the value of the \ref CY_CORTEX_M4_APPL_ADDR macro to the FLASH_START +* value in the 'xx_cm4_dual.scat' file, +* where 'xx' is the device group. Do this by either: +* - Passing the following commands to the compiler:\n +* \code -D CY_CORTEX_M4_APPL_ADDR=0x10080000 \endcode +* - Editing the \ref CY_CORTEX_M4_APPL_ADDR value in the 'system_xx.h', where +* 'xx' is device family:\n +* \code #define CY_CORTEX_M4_APPL_ADDR (0x10080000u) \endcode +* +* IAR\n +* The flash and RAM sections for the CPU are defined in the linker files: +* 'xx_yy.icf', where 'xx' is the device group, and 'yy' is the target CPU; for example, +* 'cy8c6xx7_cm0plus.icf' and 'cy8c6xx7_cm4_dual.icf'. +* \note If the start of the Cortex-M4 application image is changed, the value +* of the of the \ref CY_CORTEX_M4_APPL_ADDR should also be changed. The +* \ref CY_CORTEX_M4_APPL_ADDR macro should be used as the parameter for the \ref +* Cy_SysEnableCM4() function call. +* +* Change the flash and RAM sizes by editing the macros value in the +* linker files for both CPUs: +* - 'xx_cm0plus.icf', where 'xx' is the device group: +* \code +* define symbol __ICFEDIT_region_IROM1_start__ = 0x10000000; +* define symbol __ICFEDIT_region_IROM1_end__ = 0x10080000; +* define symbol __ICFEDIT_region_IRAM1_start__ = 0x08000000; +* define symbol __ICFEDIT_region_IRAM1_end__ = 0x08024000; +* \endcode +* - 'xx_cm4_dual.icf', where 'xx' is the device group: +* \code +* define symbol __ICFEDIT_region_IROM1_start__ = 0x10080000; +* define symbol __ICFEDIT_region_IROM1_end__ = 0x10100000; +* define symbol __ICFEDIT_region_IRAM1_start__ = 0x08024000; +* define symbol __ICFEDIT_region_IRAM1_end__ = 0x08047800; +* \endcode +* +* Change the value of the \ref CY_CORTEX_M4_APPL_ADDR macro to the +* __ICFEDIT_region_IROM1_start__ value in the 'xx_cm4_dual.icf' file, where 'xx' +* is the device group. Do this by either: +* - Passing the following commands to the compiler:\n +* \code -D CY_CORTEX_M4_APPL_ADDR=0x10080000 \endcode +* - Editing the \ref CY_CORTEX_M4_APPL_ADDR value in the 'system_xx.h', where +* 'xx' is device family:\n +* \code #define CY_CORTEX_M4_APPL_ADDR (0x10080000u) \endcode +* +* \subsection group_system_config_device_initialization Device Initialization +* After a power-on-reset (POR), the boot process is handled by the boot code +* from the on-chip ROM that is always executed by the Cortex-M0+ core. The boot +* code passes the control to the Cortex-M0+ startup code located in flash. +* +* \subsubsection group_system_config_dual_core_device_initialization Dual-Core Devices +* The Cortex-M0+ startup code performs the device initialization by a call to +* SystemInit() and then calls the main() function. The Cortex-M4 core is disabled +* by default. Enable the core using the \ref Cy_SysEnableCM4() function. +* See \ref group_system_config_cm4_functions for more details. +* \note Startup code executes SystemInit() function for the both Cortex-M0+ and Cortex-M4 cores. +* The function has a separate implementation on each core. +* Both function implementations unlock and disable the WDT. +* Therefore enable the WDT after both cores have been initialized. +* +* \subsubsection group_system_config_single_core_device_initialization Single-Core Devices +* The Cortex-M0+ core is not user-accessible on these devices. In this case the +* Flash Boot handles setup of the CM0+ core and starts the Cortex-M4 core. +* +* \subsection group_system_config_heap_stack_config Heap and Stack Configuration +* There are two ways to adjust heap and stack configurations: +* -# Editing source code files +* -# Specifying via command line +* +* By default, the stack size is set to 0x00001000 and the heap size is set to 0x00000400. +* +* \subsubsection group_system_config_heap_stack_config_gcc ARM GCC +* - Editing source code files\n +* The heap and stack sizes are defined in the assembler startup files +* (e.g. startup_psoc6_01_cm0plus.S and startup_psoc6_01_cm4.S). +* Change the heap and stack sizes by modifying the following lines:\n +* \code .equ Stack_Size, 0x00001000 \endcode +* \code .equ Heap_Size, 0x00000400 \endcode +* +* - Specifying via command line\n +* Change the heap and stack sizes passing the following commands to the compiler:\n +* \code -D __STACK_SIZE=0x000000400 \endcode +* \code -D __HEAP_SIZE=0x000000100 \endcode +* +* \subsubsection group_system_config_heap_stack_config_mdk ARM MDK +* - Editing source code files\n +* The heap and stack sizes are defined in the assembler startup files +* (e.g. startup_psoc6_01_cm0plus.s and startup_psoc6_01_cm4.s). +* Change the heap and stack sizes by modifying the following lines:\n +* \code Stack_Size EQU 0x00001000 \endcode +* \code Heap_Size EQU 0x00000400 \endcode +* +* - Specifying via command line\n +* Change the heap and stack sizes passing the following commands to the assembler:\n +* \code "--predefine=___STACK_SIZE SETA 0x000000400" \endcode +* \code "--predefine=__HEAP_SIZE SETA 0x000000100" \endcode +* +* \subsubsection group_system_config_heap_stack_config_iar IAR +* - Editing source code files\n +* The heap and stack sizes are defined in the linker scatter files: 'xx_yy.icf', +* where 'xx' is the device family, and 'yy' is the target CPU; for example, +* cy8c6xx7_cm0plus.icf and cy8c6xx7_cm4_dual.icf. +* Change the heap and stack sizes by modifying the following lines:\n +* \code Stack_Size EQU 0x00001000 \endcode +* \code Heap_Size EQU 0x00000400 \endcode +* +* - Specifying via command line\n +* Change the heap and stack sizes passing the following commands to the +* linker (including quotation marks):\n +* \code --define_symbol __STACK_SIZE=0x000000400 \endcode +* \code --define_symbol __HEAP_SIZE=0x000000100 \endcode +* +* \subsection group_system_config_merge_apps Merging CM0+ and CM4 Executables +* The CM0+ project and linker script build the CM0+ application image. Similarly, +* the CM4 linker script builds the CM4 application image. Each specifies +* locations, sizes, and contents of sections in memory. See +* \ref group_system_config_device_memory_definition for the symbols and default +* values. +* +* The cymcuelftool is invoked by a post-build command. The precise project +* setting is IDE-specific. +* +* The cymcuelftool combines the two executables. The tool examines the +* executables to ensure that memory regions either do not overlap, or contain +* identical bytes (shared). If there are no problems, it creates a new ELF file +* with the merged image, without changing any of the addresses or data. +* +* \subsection group_system_config_default_handlers Default Interrupt Handlers Definition +* The default interrupt handler functions are defined as weak functions to a dummy +* handler in the startup file. The naming convention for the interrupt handler names +* is \_IRQHandler. A default interrupt handler can be overwritten in +* user code by defining the handler function using the same name. For example: +* \code +* void scb_0_interrupt_IRQHandler(void) +*{ +* ... +*} +* \endcode +* +* \subsection group_system_config_device_vector_table Vectors Table Copy from Flash to RAM +* This process uses memory sections defined in the linker script. The startup +* code actually defines the contents of the vector table and performs the copy. +* \subsubsection group_system_config_device_vector_table_gcc ARM GCC +* The linker script file is 'xx_yy.ld', where 'xx' is the device family, and +* 'yy' is the target CPU; for example, cy8c6xx7_cm0plus.ld and cy8c6xx7_cm4_dual.ld. +* It defines sections and locations in memory.\n +* Copy interrupt vectors from flash to RAM: \n +* From: \code LONG (__Vectors) \endcode +* To: \code LONG (__ram_vectors_start__) \endcode +* Size: \code LONG (__Vectors_End - __Vectors) \endcode +* The vector table address (and the vector table itself) are defined in the +* assembler startup files (e.g. startup_psoc6_01_cm0plus.S and startup_psoc6_01_cm4.S). +* The code in these files copies the vector table from Flash to RAM. +* \subsubsection group_system_config_device_vector_table_mdk ARM MDK +* The linker script file is 'xx_yy.scat', where 'xx' is the device family, +* and 'yy' is the target CPU; for example, cy8c6xx7_cm0plus.scat and +* cy8c6xx7_cm4_dual.scat. The linker script specifies that the vector table +* (RESET_RAM) shall be first in the RAM section.\n +* RESET_RAM represents the vector table. It is defined in the assembler startup +* files (e.g. startup_psoc6_01_cm0plus.s and startup_psoc6_01_cm4.s). +* The code in these files copies the vector table from Flash to RAM. +* +* \subsubsection group_system_config_device_vector_table_iar IAR +* The linker script file is 'xx_yy.icf', where 'xx' is the device family, and +* 'yy' is the target CPU; for example, cy8c6xx7_cm0plus.icf and cy8c6xx7_cm4_dual.icf. +* This file defines the .intvec_ram section and its location. +* \code place at start of IRAM1_region { readwrite section .intvec_ram}; \endcode +* The vector table address (and the vector table itself) are defined in the +* assembler startup files (e.g. startup_psoc6_01_cm0plus.s and startup_psoc6_01_cm4.s). +* The code in these files copies the vector table from Flash to RAM. +* +* \section group_system_config_more_information More Information +* Refer to the PDL User Guide for the +* more details. +* +* \section group_system_config_MISRA MISRA Compliance +* +* +* +* +* +* +* +* +* +* +* +* +* +* +*
MISRA RuleRule Class (Required/Advisory)Rule DescriptionDescription of Deviation(s)
2.3RThe character sequence // shall not be used within a comment.The comments provide a useful WEB link to the documentation.
+* +* \section group_system_config_changelog Changelog +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +*
VersionChangesReason for Change
2.60Updated linker scripts.Provided support for new devices, updated usage of CM0p prebuilt image.
2.50Updated assembler files, C files, linker scripts.Dynamic allocated HEAP size for Arm Compiler 6, IAR 8.
2.40Updated assembler files, C files, linker scripts.Added Arm Compiler 6 support.
2.30Added assembler files, linker scripts for Mbed OS.Added Arm Mbed OS embedded operating system support.
Updated linker scripts to extend the Flash and Ram memories size available for the CM4 core.Enhanced PDL usability.
2.20Moved the Cy_IPC_SystemSemaInit(), Cy_IPC_SystemPipeInit() functions implementation from IPC to Startup.Changed the IPC driver configuration method from compile time to run time.
2.10Added constructor attribute to SystemInit() function declaration for ARM MDK compiler. \n +* Removed $Sub$$main symbol for ARM MDK compiler. +* uVision Debugger support.
Updated description of the Startup behavior for Single-Core Devices. \n +* Added note about WDT disabling by SystemInit() function. +* Documentation improvement.
2.0Added restoring of FLL registers to the default state in SystemInit() API for single core devices. +* Single core device support. +*
Added Normal Access Restrictions, Public Key, TOC part2 and TOC part2 copy to Supervisory flash linker memory regions. \n +* Renamed 'wflash' memory region to 'em_eeprom'. +* Linker scripts usability improvement.
Added Cy_IPC_SystemSemaInit(), Cy_IPC_SystemPipeInit(), Cy_Flash_Init() functions call to SystemInit() API.Reserved system resources for internal operations.
Added clearing and releasing of IPC structure #7 (reserved for the Deep-Sleep operations) to SystemInit() API.To avoid deadlocks in case of SW or WDT reset during Deep-Sleep entering.
1.0Initial version
+* +* +* \defgroup group_system_config_macro Macro +* \{ +* \defgroup group_system_config_system_macro System +* \defgroup group_system_config_cm4_status_macro Cortex-M4 Status +* \defgroup group_system_config_user_settings_macro User Settings +* \} +* \defgroup group_system_config_functions Functions +* \{ +* \defgroup group_system_config_system_functions System +* \defgroup group_system_config_cm4_functions Cortex-M4 Control +* \} +* \defgroup group_system_config_globals Global Variables +* +* \} +*/ + +/** +* \addtogroup group_system_config_system_functions +* \{ +* \details +* The following system functions implement CMSIS Core functions. +* Refer to the [CMSIS documentation] +* (http://www.keil.com/pack/doc/CMSIS/Core/html/group__system__init__gr.html "System and Clock Configuration") +* for more details. +* \} +*/ + +#ifdef __cplusplus +extern "C" { +#endif + + +/******************************************************************************* +* Include files +*******************************************************************************/ +#include + + +/******************************************************************************* +* Global preprocessor symbols/macros ('define') +*******************************************************************************/ +#if ((defined(__GNUC__) && (__ARM_ARCH == 6) && (__ARM_ARCH_6M__ == 1)) || \ + (defined (__ICCARM__) && (__CORE__ == __ARM6M__)) || \ + (defined(__ARMCC_VERSION) && (__TARGET_ARCH_THUMB == 3))) + #define CY_SYSTEM_CPU_CM0P 1UL +#else + #define CY_SYSTEM_CPU_CM0P 0UL +#endif + +#if defined (CY_PSOC_CREATOR_USED) && (CY_PSOC_CREATOR_USED == 1U) + #include "cyfitter.h" +#endif /* (CY_PSOC_CREATOR_USED) && (CY_PSOC_CREATOR_USED == 1U) */ + + + + +/******************************************************************************* +* +* START OF USER SETTINGS HERE +* =========================== +* +* All lines with '<<<' can be set by user. +* +*******************************************************************************/ + +/** +* \addtogroup group_system_config_user_settings_macro +* \{ +*/ + +#if defined (CYDEV_CLK_EXTCLK__HZ) + #define CY_CLK_EXT_FREQ_HZ (CYDEV_CLK_EXTCLK__HZ) +#else + /***************************************************************************//** + * External Clock Frequency (in Hz, [value]UL). If compiled within + * PSoC Creator and the clock is enabled in the DWR, the value from DWR used. + * Otherwise, edit the value below. + * (USER SETTING) + *******************************************************************************/ + #define CY_CLK_EXT_FREQ_HZ (24000000UL) /* <<< 24 MHz */ +#endif /* (CYDEV_CLK_EXTCLK__HZ) */ + + +#if defined (CYDEV_CLK_ECO__HZ) + #define CY_CLK_ECO_FREQ_HZ (CYDEV_CLK_ECO__HZ) +#else + /***************************************************************************//** + * \brief External crystal oscillator frequency (in Hz, [value]UL). If compiled + * within PSoC Creator and the clock is enabled in the DWR, the value from DWR + * used. + * (USER SETTING) + *******************************************************************************/ + #define CY_CLK_ECO_FREQ_HZ (24000000UL) /* <<< 24 MHz */ +#endif /* (CYDEV_CLK_ECO__HZ) */ + + +#if defined (CYDEV_CLK_ALTHF__HZ) + #define CY_CLK_ALTHF_FREQ_HZ (CYDEV_CLK_ALTHF__HZ) +#else + /***************************************************************************//** + * \brief Alternate high frequency (in Hz, [value]UL). If compiled within + * PSoC Creator and the clock is enabled in the DWR, the value from DWR used. + * Otherwise, edit the value below. + * (USER SETTING) + *******************************************************************************/ + #define CY_CLK_ALTHF_FREQ_HZ (32000000UL) /* <<< 32 MHz */ +#endif /* (CYDEV_CLK_ALTHF__HZ) */ + + +/***************************************************************************//** +* \brief Start address of the Cortex-M4 application ([address]UL) +* (USER SETTING) +*******************************************************************************/ +#if !defined (CY_CORTEX_M4_APPL_ADDR) + #define CY_CORTEX_M4_APPL_ADDR (CY_FLASH_BASE + 0x2000U) /* <<< 8 kB of flash is reserved for the Cortex-M0+ application */ +#endif /* (CY_CORTEX_M4_APPL_ADDR) */ + + +/***************************************************************************//** +* \brief IPC Semaphores allocation ([value]UL). +* (USER SETTING) +*******************************************************************************/ +#define CY_IPC_SEMA_COUNT (128UL) /* <<< This will allow 128 (4*32) semaphores */ + + +/***************************************************************************//** +* \brief IPC Pipe definitions ([value]UL). +* (USER SETTING) +*******************************************************************************/ +#define CY_IPC_MAX_ENDPOINTS (8UL) /* <<< 8 endpoints */ + + +/******************************************************************************* +* +* END OF USER SETTINGS HERE +* ========================= +* +*******************************************************************************/ + +/** \} group_system_config_user_settings_macro */ + + +/** +* \addtogroup group_system_config_system_macro +* \{ +*/ + +#if (CY_SYSTEM_CPU_CM0P == 1UL) || defined(CY_DOXYGEN) + /** The Cortex-M0+ startup driver identifier */ + #define CY_STARTUP_M0P_ID ((uint32_t)((uint32_t)((0x0EU) & 0x3FFFU) << 18U)) +#endif /* (CY_SYSTEM_CPU_CM0P == 1UL) */ + +#if (CY_SYSTEM_CPU_CM0P != 1UL) || defined(CY_DOXYGEN) + /** The Cortex-M4 startup driver identifier */ + #define CY_STARTUP_M4_ID ((uint32_t)((uint32_t)((0x0FU) & 0x3FFFU) << 18U)) +#endif /* (CY_SYSTEM_CPU_CM0P != 1UL) */ + +/** \} group_system_config_system_macro */ + + +/** +* \addtogroup group_system_config_system_functions +* \{ +*/ +extern void SystemInit(void); + +extern void SystemCoreClockUpdate(void); +/** \} group_system_config_system_functions */ + + +/** +* \addtogroup group_system_config_cm4_functions +* \{ +*/ +extern uint32_t Cy_SysGetCM4Status(void); +extern void Cy_SysEnableCM4(uint32_t vectorTableOffset); +extern void Cy_SysDisableCM4(void); +extern void Cy_SysRetainCM4(void); +extern void Cy_SysResetCM4(void); +/** \} group_system_config_cm4_functions */ + + +/** \cond */ +extern void Default_Handler (void); + +void Cy_SysIpcPipeIsrCm0(void); +void Cy_SysIpcPipeIsrCm4(void); + +extern void Cy_SystemInit(void); +extern void Cy_SystemInitFpuEnable(void); + +extern uint32_t cy_delayFreqHz; +extern uint32_t cy_delayFreqKhz; +extern uint8_t cy_delayFreqMhz; +extern uint32_t cy_delay32kMs; +/** \endcond */ + + +#if (CY_SYSTEM_CPU_CM0P == 1UL) || defined(CY_DOXYGEN) +/** +* \addtogroup group_system_config_cm4_status_macro +* \{ +*/ +#define CY_SYS_CM4_STATUS_ENABLED (3U) /**< The Cortex-M4 core is enabled: power on, clock on, no isolate, no reset and no retain. */ +#define CY_SYS_CM4_STATUS_DISABLED (0U) /**< The Cortex-M4 core is disabled: power off, clock off, isolate, reset and no retain. */ +#define CY_SYS_CM4_STATUS_RETAINED (2U) /**< The Cortex-M4 core is retained. power off, clock off, isolate, no reset and retain. */ +#define CY_SYS_CM4_STATUS_RESET (1U) /**< The Cortex-M4 core is in the Reset mode: clock off, no isolated, no retain and reset. */ +/** \} group_system_config_cm4_status_macro */ + +#endif /* (CY_SYSTEM_CPU_CM0P == 1UL) */ + + +/******************************************************************************* +* IPC Configuration +* ========================= +*******************************************************************************/ +/* IPC CY_PIPE default configuration */ +#define CY_SYS_CYPIPE_CLIENT_CNT (8UL) + +#define CY_SYS_INTR_CYPIPE_MUX_EP0 (1UL) /* IPC CYPRESS PIPE */ +#define CY_SYS_INTR_CYPIPE_PRIOR_EP0 (1UL) /* Notifier Priority */ +#define CY_SYS_INTR_CYPIPE_PRIOR_EP1 (1UL) /* Notifier Priority */ + +#define CY_SYS_CYPIPE_CHAN_MASK_EP0 (0x0001UL << CY_IPC_CHAN_CYPIPE_EP0) +#define CY_SYS_CYPIPE_CHAN_MASK_EP1 (0x0001UL << CY_IPC_CHAN_CYPIPE_EP1) + + +/******************************************************************************/ +/* + * The System pipe configuration defines the IPC channel number, interrupt + * number, and the pipe interrupt mask for the endpoint. + * + * The format of the endPoint configuration + * Bits[31:16] Interrupt Mask + * Bits[15:8 ] IPC interrupt + * Bits[ 7:0 ] IPC channel + */ + +/* System Pipe addresses */ +/* CyPipe defines */ + +#define CY_SYS_CYPIPE_INTR_MASK ( CY_SYS_CYPIPE_CHAN_MASK_EP0 | CY_SYS_CYPIPE_CHAN_MASK_EP1 ) + +#define CY_SYS_CYPIPE_CONFIG_EP0 ( (CY_SYS_CYPIPE_INTR_MASK << CY_IPC_PIPE_CFG_IMASK_Pos) \ + | (CY_IPC_INTR_CYPIPE_EP0 << CY_IPC_PIPE_CFG_INTR_Pos) \ + | CY_IPC_CHAN_CYPIPE_EP0) +#define CY_SYS_CYPIPE_CONFIG_EP1 ( (CY_SYS_CYPIPE_INTR_MASK << CY_IPC_PIPE_CFG_IMASK_Pos) \ + | (CY_IPC_INTR_CYPIPE_EP1 << CY_IPC_PIPE_CFG_INTR_Pos) \ + | CY_IPC_CHAN_CYPIPE_EP1) + +/******************************************************************************/ + + +/** \addtogroup group_system_config_globals +* \{ +*/ + +extern uint32_t SystemCoreClock; +extern uint32_t cy_BleEcoClockFreqHz; +extern uint32_t cy_Hfclk0FreqHz; +extern uint32_t cy_PeriClkFreqHz; + +/** \} group_system_config_globals */ + + + +/** \cond INTERNAL */ +/******************************************************************************* +* Backward compatibility macro. The following code is DEPRECATED and must +* not be used in new projects +*******************************************************************************/ + +/* BWC defines for functions related to enter/exit critical section */ +#define Cy_SaveIRQ Cy_SysLib_EnterCriticalSection +#define Cy_RestoreIRQ Cy_SysLib_ExitCriticalSection +#define CY_SYS_INTR_CYPIPE_EP0 (CY_IPC_INTR_CYPIPE_EP0) +#define CY_SYS_INTR_CYPIPE_EP1 (CY_IPC_INTR_CYPIPE_EP1) + +/** \endcond */ + +#ifdef __cplusplus +} +#endif + +#endif /* _SYSTEM_PSOC6_H_ */ + + +/* [] END OF FILE */ diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_WHD/resources/firmware/TARGET_43438/resources.h b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_WHD/resources/firmware/TARGET_43438/resources.h new file mode 100644 index 00000000000..2f6e626b332 --- /dev/null +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_WHD/resources/firmware/TARGET_43438/resources.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2019, Cypress Semiconductor Corporation, All Rights Reserved + * SPDX-License-Identifier: LicenseRef-PBL + * + * This file and the related binary are licensed under the + * Permissive Binary License, Version 1.0 (the "License"); + * you may not use these files except in compliance with the License. + * + * You may obtain a copy of the License here: + * LICENSE-permissive-binary-license-1.0.txt and at + * https://www.mbed.com/licenses/PBL-1.0 + * + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* Automatically generated file - this comment ensures resources.h file creation */ +/* Auto-generated header file. Do not edit */ +#ifndef INCLUDED_RESOURCES_H_ +#define INCLUDED_RESOURCES_H_ +#include "wiced_resource.h" + +extern const resource_hnd_t wifi_firmware_image; +extern const resource_hnd_t wifi_firmware_clm_blob; +extern const unsigned char wifi_firmware_image_data[420690]; +extern const unsigned char wifi_firmware_clm_blob_image_data[7222]; + +#endif /* ifndef INCLUDED_RESOURCES_H_ */ + diff --git a/targets/targets.json b/targets/targets.json index fa754d23cec..4bb3cdface8 100644 --- a/targets/targets.json +++ b/targets/targets.json @@ -9234,6 +9234,29 @@ "function": "PSOC6Code.sign_image" } }, + "CYW9P62S1_43438EVB_01": { + "inherits": ["MCU_PSOC6_M4"], + "features": ["BLE"], + "supported_form_factors": ["ARDUINO"], + "components_add": ["WHD", "43438", "CYW43XXX" ], + "extra_labels_add": [ + "PSOC6_01", + "MXCRYPTO_01", + "CM0P_SLEEP", + "CORDIO" + ], + "macros_add": ["CY8C6247BZI_D54", "CYHAL_UDB_SDIO", "CYBSP_WIFI_CAPABLE"], + "detect_code": ["1900"], + "post_binary_hook": { + "function": "PSOC6Code.complete" + }, + "bootloader_supported": true, + "sectors": [[268435456, 512]], + "overrides": { + "network-default-interface-type": "WIFI" + }, + "program_cycle_s": 10 + }, "CYW943012P6EVB_01": { "inherits": ["MCU_PSOC6_M4"], "features": ["BLE"],