CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 06:13:25 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=21ded60940e7662a91724a578b77fca009fa63166bfcd103c4b2be3605bcbc14a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22Ft5lw-6KHUTln55OMmOo6WRDE0iaT7se%22%3B%7D; HttpOnly; Path=/
cf-ray: 98cc3621ada01712-BLR
Mik32+UART1+IRQ - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "scr1_csr_encoding.h"
- #include "riscv_csr_encoding.h"
- #include "mik32_memory_map.h"
- #include "power_manager.h"
- #include "pad_config.h"
- #include "epic.h"
- #include "uart.h"
- volatile uint32_t ddd;
- void trap_handler(void)
- {
- if (EPIC->RAW_STATUS & (1<<EPIC_UART_1_INDEX)) {
- if(UART_1->FLAGS & UART_FLAGS_RXNE_M)
- {
- ddd = UART_1->RXDATA;
- UART_1->TXDATA = ddd;
- }
- }
- }
- int main()
- {
- PM->CLK_APB_M_SET |= PM_CLOCK_APB_M_EPIC_M;
- PM->CLK_APB_P_SET |= PM_CLOCK_APB_P_UART_1_M | PM_CLOCK_APB_P_GPIO_1_M ;
- PAD_CONFIG->PORT_1_CFG = (PAD_CONFIG->PORT_1_CFG & ~(PAD_CONFIG_PIN_M(8) | PAD_CONFIG_PIN_M(9))) \
- | PAD_CONFIG_PIN(8,0x01) | PAD_CONFIG_PIN(9,0x01);
- UART_1->CONTROL1 = 0;
- UART_1->DIVIDER = 32000000/115200;
- UART_1->CONTROL2 = 0;
- UART_1->CONTROL3 = 0;
- UART_1->CONTROL1 = UART_CONTROL1_TE_M | UART_CONTROL1_RE_M | UART_CONTROL1_M_8BIT_M | UART_CONTROL1_UE_M;
- EPIC->MASK_LEVEL_SET = 1 << EPIC_UART_1_INDEX;
- UART_1->CONTROL1 |= UART_CONTROL1_RXNEIE_M;
- // global interrupt enable
- set_csr(mstatus, MSTATUS_MIE); // Global interrupt enable
- set_csr(mie, MIE_MEIE); // Machine External Interrupt Enable
- while (1)
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐✅ Marketplace Glitch ✅ Working ✅ NEVER SEEN...
JavaScript | 8 sec ago | 0.24 KB
-
✅⭐ Make $2500 in 15 minutes ✅ NEVER SEEN BEFO...
JavaScript | 17 sec ago | 0.24 KB
-
⭐✅ Trading Profit Method ✅ NEVER SEEN BEFORE...
JavaScript | 30 sec ago | 0.24 KB
-
⭐ Instant BTC Profit Method ✅ NEVER SEEN BEFO...
JavaScript | 43 sec ago | 0.24 KB
-
⭐✅ MAKE $2000 INSTANTLY ✅ NEVER SEEN BEFORE ⭐...
JavaScript | 52 sec ago | 0.24 KB
-
⭐ Free Crypto Method ✅ NEVER SEEN BEFORE ⭐⭐⭐
JavaScript | 1 min ago | 0.24 KB
-
✅⭐ Make huge profits on trading ✅ NEVER SEEN...
JavaScript | 1 min ago | 0.24 KB
-
⭐✅ Marketplace Glitch ✅ Working ✅ NEVER SEEN...
JavaScript | 1 min ago | 0.24 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand